Compare commits
1 Commits
__refs_pul
...
__refs_pul
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2a6dde438 |
@@ -8,10 +8,8 @@ cp LICENSE.txt "$DIR_NAME"
|
||||
cp README.md "$DIR_NAME"
|
||||
|
||||
if [[ -z "${NO_SOURCE_PACK}" ]]; then
|
||||
git clone --depth 1 file://$(readlink -e .) ${REV_NAME}-source
|
||||
tar -cJvf "${REV_NAME}-source.tar.xz" ${REV_NAME}-source
|
||||
tar -cJvf "${REV_NAME}-source.tar.xz" src externals CMakeLists.txt README.md LICENSE.txt
|
||||
cp -v "${REV_NAME}-source.tar.xz" "$DIR_NAME"
|
||||
cp -v "${REV_NAME}-source.tar.xz" "${ARTIFACTS_DIR}/"
|
||||
fi
|
||||
|
||||
tar $COMPRESSION_FLAGS "$ARCHIVE_NAME" "$DIR_NAME"
|
||||
|
||||
@@ -42,10 +42,14 @@ mkdir $RELEASE_DIST
|
||||
mkdir $MSVC_SOURCE
|
||||
mkdir "artifacts"
|
||||
|
||||
$CURRENT_DIR = Convert-Path .
|
||||
|
||||
# Build a tar.xz for the source of the release
|
||||
git clone --depth 1 file://$CURRENT_DIR $MSVC_SOURCE
|
||||
Copy-Item .\LICENSE.txt -Destination $MSVC_SOURCE
|
||||
Copy-Item .\README.md -Destination $MSVC_SOURCE
|
||||
Copy-Item .\CMakeLists.txt -Destination $MSVC_SOURCE
|
||||
Copy-Item .\src -Recurse -Destination $MSVC_SOURCE
|
||||
Copy-Item .\externals -Recurse -Destination $MSVC_SOURCE
|
||||
Copy-Item .\dist -Recurse -Destination $MSVC_SOURCE
|
||||
Copy-Item .\CMakeModules -Recurse -Destination $MSVC_SOURCE
|
||||
7z a -r -ttar $MSVC_SOURCE_TAR $MSVC_SOURCE
|
||||
7z a -r -txz $MSVC_SOURCE_TARXZ $MSVC_SOURCE_TAR
|
||||
|
||||
|
||||
2
.gitignore
vendored
@@ -7,7 +7,7 @@ doc-build/
|
||||
|
||||
# Generated source files
|
||||
src/common/scm_rev.cpp
|
||||
dist/english_plurals/generated_en.ts
|
||||
.travis.descriptor.json
|
||||
|
||||
# Project/editor files
|
||||
*.swp
|
||||
|
||||
62
.reuse/dep5
@@ -2,8 +2,7 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Comment: It is best to use this file to record copyright information about
|
||||
generated, binary and third party files
|
||||
|
||||
Files: dist/english_plurals/*
|
||||
dist/icons/controller/*.png
|
||||
Files: dist/icons/controller/*.png
|
||||
dist/icons/overlay/*.png
|
||||
dist/languages/*
|
||||
dist/qt_themes/*/icons/index.theme
|
||||
@@ -31,57 +30,32 @@ Copyright: 2013 Colin Duquesnoy
|
||||
2019 Daniel Cosmo Pizetta
|
||||
License: CC-BY-4.0
|
||||
|
||||
Files: dist/qt_themes/default/icons/256x256/plus_folder.png
|
||||
dist/qt_themes/default/icons/48x48/bad_folder.png
|
||||
dist/qt_themes/default/icons/48x48/chip.png
|
||||
dist/qt_themes/default/icons/48x48/folder.png
|
||||
dist/qt_themes/default/icons/48x48/star.png
|
||||
dist/qt_themes/qdarkstyle/icons/256x256/plus_folder.png
|
||||
dist/qt_themes/qdarkstyle/icons/48x48/bad_folder.png
|
||||
dist/qt_themes/qdarkstyle/icons/48x48/chip.png
|
||||
dist/qt_themes/qdarkstyle/icons/48x48/folder.png
|
||||
dist/qt_themes/qdarkstyle/icons/48x48/star.png
|
||||
Copyright: Refactoring UI Inc.
|
||||
License: MIT
|
||||
Comment: https://github.com/tailwindlabs/heroicons
|
||||
|
||||
Files: dist/qt_themes/colorful/icons/16x16/lock.png
|
||||
dist/qt_themes/colorful/icons/256x256/plus_folder.png
|
||||
dist/qt_themes/colorful/icons/48x48/bad_folder.png
|
||||
dist/qt_themes/colorful/icons/48x48/chip.png
|
||||
dist/qt_themes/colorful/icons/48x48/folder.png
|
||||
dist/qt_themes/colorful_dark/icons/16x16/lock.png
|
||||
Copyright: Icons8
|
||||
License: MIT
|
||||
Comment: https://github.com/icons8/flat-color-icons
|
||||
|
||||
Files: dist/qt_themes/*/icons/16x16/connected.png
|
||||
dist/qt_themes/*/icons/16x16/connected_notification.png
|
||||
dist/qt_themes/*/icons/16x16/disconnected.png
|
||||
Copyright: GNOME Project
|
||||
License: CC-BY-SA-3.0
|
||||
Comment: connected_notification and disconnected are modified
|
||||
|
||||
Files: dist/qt_themes/*/icons/48x48/no_avatar.png
|
||||
Copyright: Ionic (http://ionic.io/)
|
||||
License: MIT
|
||||
|
||||
|
||||
Files: dist/qt_themes/*/icons/48x48/sd_card.png
|
||||
dist/qt_themes/colorful/icons/48x48/star.png
|
||||
dist/qt_themes/*/icons/16x16/lock.png
|
||||
dist/qt_themes/*/icons/48x48/bad_folder.png
|
||||
dist/qt_themes/*/icons/48x48/chip.png
|
||||
dist/qt_themes/*/icons/48x48/folder.png
|
||||
dist/qt_themes/*/icons/48x48/no_avatar.png
|
||||
dist/qt_themes/*/icons/48x48/sd_card.png
|
||||
dist/qt_themes/*/icons/48x48/star.png
|
||||
dist/qt_themes/*/icons/256x256/plus_folder.png
|
||||
dist/qt_themes/colorful/icons/48x48/plus.png
|
||||
dist/qt_themes/default/icons/16x16/checked.png
|
||||
dist/qt_themes/default/icons/16x16/failed.png
|
||||
Copyright: SVG Repo
|
||||
License: CC0-1.0
|
||||
Copyright: https://icons8.com
|
||||
License: CC-BY-ND-3.0
|
||||
|
||||
Files: dist/qt_themes/*/icons/16x16/view-refresh.png
|
||||
dist/qt_themes/default/icons/16x16/lock.png
|
||||
dist/qt_themes/qdarkstyle/icons/16x16/lock.png
|
||||
Files: dist/qt_themes/*/icons/16x16/refresh.png
|
||||
dist/qt_themes/*/icons/16x16/view-refresh.png
|
||||
Copyright: Google, Inc.
|
||||
License: Apache-2.0
|
||||
|
||||
Files: dist/qt_themes/*/icons/48x48/list-add.png
|
||||
Copyright: Docteh
|
||||
Files: dist/qt_themes/default/icons/48x48/plus.png
|
||||
dist/qt_themes/qdarkstyle/icons/48x48/plus.png
|
||||
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/plus.png
|
||||
Copyright: BreadFish64
|
||||
License: CC0-1.0
|
||||
|
||||
Files: externals/getopt/getopt.c
|
||||
|
||||
87
LICENSES/CC-BY-ND-3.0.txt
Normal file
@@ -0,0 +1,87 @@
|
||||
Creative Commons Attribution-NoDerivs 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License.
|
||||
|
||||
b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License.
|
||||
|
||||
c. "Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership.
|
||||
|
||||
d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.
|
||||
|
||||
e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast.
|
||||
|
||||
f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work.
|
||||
|
||||
g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
|
||||
|
||||
h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images.
|
||||
|
||||
i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and,
|
||||
|
||||
b. to Distribute and Publicly Perform the Work including as incorporated in Collections.
|
||||
|
||||
c. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;
|
||||
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,
|
||||
|
||||
iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested.
|
||||
|
||||
b. If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(b) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.
|
||||
|
||||
c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
|
||||
|
||||
b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
|
||||
|
||||
b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
|
||||
|
||||
c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
|
||||
|
||||
d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
|
||||
|
||||
e. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law.
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License.
|
||||
|
||||
Creative Commons may be contacted at http://creativecommons.org/.
|
||||
@@ -1,359 +0,0 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
Attribution-ShareAlike 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
||||
DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
||||
CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
||||
other pre-existing works, such as a translation, adaptation,
|
||||
derivative work, arrangement of music or other alterations of a
|
||||
literary or artistic work, or phonogram or performance and includes
|
||||
cinematographic adaptations or any other form in which the Work may be
|
||||
recast, transformed, or adapted including in any form recognizably
|
||||
derived from the original, except that a work that constitutes a
|
||||
Collection will not be considered an Adaptation for the purpose of
|
||||
this License. For the avoidance of doubt, where the Work is a musical
|
||||
work, performance or phonogram, the synchronization of the Work in
|
||||
timed-relation with a moving image ("synching") will be considered an
|
||||
Adaptation for the purpose of this License.
|
||||
b. "Collection" means a collection of literary or artistic works, such as
|
||||
encyclopedias and anthologies, or performances, phonograms or
|
||||
broadcasts, or other works or subject matter other than works listed
|
||||
in Section 1(f) below, which, by reason of the selection and
|
||||
arrangement of their contents, constitute intellectual creations, in
|
||||
which the Work is included in its entirety in unmodified form along
|
||||
with one or more other contributions, each constituting separate and
|
||||
independent works in themselves, which together are assembled into a
|
||||
collective whole. A work that constitutes a Collection will not be
|
||||
considered an Adaptation (as defined below) for the purposes of this
|
||||
License.
|
||||
c. "Creative Commons Compatible License" means a license that is listed
|
||||
at https://creativecommons.org/compatiblelicenses that has been
|
||||
approved by Creative Commons as being essentially equivalent to this
|
||||
License, including, at a minimum, because that license: (i) contains
|
||||
terms that have the same purpose, meaning and effect as the License
|
||||
Elements of this License; and, (ii) explicitly permits the relicensing
|
||||
of adaptations of works made available under that license under this
|
||||
License or a Creative Commons jurisdiction license with the same
|
||||
License Elements as this License.
|
||||
d. "Distribute" means to make available to the public the original and
|
||||
copies of the Work or Adaptation, as appropriate, through sale or
|
||||
other transfer of ownership.
|
||||
e. "License Elements" means the following high-level license attributes
|
||||
as selected by Licensor and indicated in the title of this License:
|
||||
Attribution, ShareAlike.
|
||||
f. "Licensor" means the individual, individuals, entity or entities that
|
||||
offer(s) the Work under the terms of this License.
|
||||
g. "Original Author" means, in the case of a literary or artistic work,
|
||||
the individual, individuals, entity or entities who created the Work
|
||||
or if no individual or entity can be identified, the publisher; and in
|
||||
addition (i) in the case of a performance the actors, singers,
|
||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
||||
play in, interpret or otherwise perform literary or artistic works or
|
||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
||||
being the person or legal entity who first fixes the sounds of a
|
||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
||||
organization that transmits the broadcast.
|
||||
h. "Work" means the literary and/or artistic work offered under the terms
|
||||
of this License including without limitation any production in the
|
||||
literary, scientific and artistic domain, whatever may be the mode or
|
||||
form of its expression including digital form, such as a book,
|
||||
pamphlet and other writing; a lecture, address, sermon or other work
|
||||
of the same nature; a dramatic or dramatico-musical work; a
|
||||
choreographic work or entertainment in dumb show; a musical
|
||||
composition with or without words; a cinematographic work to which are
|
||||
assimilated works expressed by a process analogous to cinematography;
|
||||
a work of drawing, painting, architecture, sculpture, engraving or
|
||||
lithography; a photographic work to which are assimilated works
|
||||
expressed by a process analogous to photography; a work of applied
|
||||
art; an illustration, map, plan, sketch or three-dimensional work
|
||||
relative to geography, topography, architecture or science; a
|
||||
performance; a broadcast; a phonogram; a compilation of data to the
|
||||
extent it is protected as a copyrightable work; or a work performed by
|
||||
a variety or circus performer to the extent it is not otherwise
|
||||
considered a literary or artistic work.
|
||||
i. "You" means an individual or entity exercising rights under this
|
||||
License who has not previously violated the terms of this License with
|
||||
respect to the Work, or who has received express permission from the
|
||||
Licensor to exercise rights under this License despite a previous
|
||||
violation.
|
||||
j. "Publicly Perform" means to perform public recitations of the Work and
|
||||
to communicate to the public those public recitations, by any means or
|
||||
process, including by wire or wireless means or public digital
|
||||
performances; to make available to the public Works in such a way that
|
||||
members of the public may access these Works from a place and at a
|
||||
place individually chosen by them; to perform the Work to the public
|
||||
by any means or process and the communication to the public of the
|
||||
performances of the Work, including by public digital performance; to
|
||||
broadcast and rebroadcast the Work by any means including signs,
|
||||
sounds or images.
|
||||
k. "Reproduce" means to make copies of the Work by any means including
|
||||
without limitation by sound or visual recordings and the right of
|
||||
fixation and reproducing fixations of the Work, including storage of a
|
||||
protected performance or phonogram in digital form or other electronic
|
||||
medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
||||
limit, or restrict any uses free from copyright or rights arising from
|
||||
limitations or exceptions that are provided for in connection with the
|
||||
copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License,
|
||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||
perpetual (for the duration of the applicable copyright) license to
|
||||
exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
||||
Collections, and to Reproduce the Work as incorporated in the
|
||||
Collections;
|
||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
||||
including any translation in any medium, takes reasonable steps to
|
||||
clearly label, demarcate or otherwise identify that changes were made
|
||||
to the original Work. For example, a translation could be marked "The
|
||||
original work was translated from English to Spanish," or a
|
||||
modification could indicate "The original work has been modified.";
|
||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
||||
in Collections; and,
|
||||
d. to Distribute and Publicly Perform Adaptations.
|
||||
e. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme cannot be waived, the Licensor
|
||||
reserves the exclusive right to collect such royalties for any
|
||||
exercise by You of the rights granted under this License;
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme can be waived, the Licensor waives the
|
||||
exclusive right to collect such royalties for any exercise by You
|
||||
of the rights granted under this License; and,
|
||||
iii. Voluntary License Schemes. The Licensor waives the right to
|
||||
collect royalties, whether individually or, in the event that the
|
||||
Licensor is a member of a collecting society that administers
|
||||
voluntary licensing schemes, via that society, from any exercise
|
||||
by You of the rights granted under this License.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now
|
||||
known or hereafter devised. The above rights include the right to make
|
||||
such modifications as are technically necessary to exercise the rights in
|
||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
||||
granted by Licensor are hereby reserved.
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
||||
subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
||||
of this License. You must include a copy of, or the Uniform Resource
|
||||
Identifier (URI) for, this License with every copy of the Work You
|
||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability of
|
||||
the recipient of the Work to exercise the rights granted to that
|
||||
recipient under the terms of the License. You may not sublicense the
|
||||
Work. You must keep intact all notices that refer to this License and
|
||||
to the disclaimer of warranties with every copy of the Work You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Work, You may not impose any effective technological
|
||||
measures on the Work that restrict the ability of a recipient of the
|
||||
Work from You to exercise the rights granted to that recipient under
|
||||
the terms of the License. This Section 4(a) applies to the Work as
|
||||
incorporated in a Collection, but this does not require the Collection
|
||||
apart from the Work itself to be made subject to the terms of this
|
||||
License. If You create a Collection, upon notice from any Licensor You
|
||||
must, to the extent practicable, remove from the Collection any credit
|
||||
as required by Section 4(c), as requested. If You create an
|
||||
Adaptation, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Adaptation any credit as required by
|
||||
Section 4(c), as requested.
|
||||
b. You may Distribute or Publicly Perform an Adaptation only under the
|
||||
terms of: (i) this License; (ii) a later version of this License with
|
||||
the same License Elements as this License; (iii) a Creative Commons
|
||||
jurisdiction license (either this or a later license version) that
|
||||
contains the same License Elements as this License (e.g.,
|
||||
Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible
|
||||
License. If you license the Adaptation under one of the licenses
|
||||
mentioned in (iv), you must comply with the terms of that license. If
|
||||
you license the Adaptation under the terms of any of the licenses
|
||||
mentioned in (i), (ii) or (iii) (the "Applicable License"), you must
|
||||
comply with the terms of the Applicable License generally and the
|
||||
following provisions: (I) You must include a copy of, or the URI for,
|
||||
the Applicable License with every copy of each Adaptation You
|
||||
Distribute or Publicly Perform; (II) You may not offer or impose any
|
||||
terms on the Adaptation that restrict the terms of the Applicable
|
||||
License or the ability of the recipient of the Adaptation to exercise
|
||||
the rights granted to that recipient under the terms of the Applicable
|
||||
License; (III) You must keep intact all notices that refer to the
|
||||
Applicable License and to the disclaimer of warranties with every copy
|
||||
of the Work as included in the Adaptation You Distribute or Publicly
|
||||
Perform; (IV) when You Distribute or Publicly Perform the Adaptation,
|
||||
You may not impose any effective technological measures on the
|
||||
Adaptation that restrict the ability of a recipient of the Adaptation
|
||||
from You to exercise the rights granted to that recipient under the
|
||||
terms of the Applicable License. This Section 4(b) applies to the
|
||||
Adaptation as incorporated in a Collection, but this does not require
|
||||
the Collection apart from the Adaptation itself to be made subject to
|
||||
the terms of the Applicable License.
|
||||
c. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
||||
Collections, You must, unless a request has been made pursuant to
|
||||
Section 4(a), keep intact all copyright notices for the Work and
|
||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
||||
and/or if the Original Author and/or Licensor designate another party
|
||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
||||
terms of service or by other reasonable means, the name of such party
|
||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
||||
extent reasonably practicable, the URI, if any, that Licensor
|
||||
specifies to be associated with the Work, unless such URI does not
|
||||
refer to the copyright notice or licensing information for the Work;
|
||||
and (iv) , consistent with Ssection 3(b), in the case of an
|
||||
Adaptation, a credit identifying the use of the Work in the Adaptation
|
||||
(e.g., "French translation of the Work by Original Author," or
|
||||
"Screenplay based on original Work by Original Author"). The credit
|
||||
required by this Section 4(c) may be implemented in any reasonable
|
||||
manner; provided, however, that in the case of a Adaptation or
|
||||
Collection, at a minimum such credit will appear, if a credit for all
|
||||
contributing authors of the Adaptation or Collection appears, then as
|
||||
part of these credits and in a manner at least as prominent as the
|
||||
credits for the other contributing authors. For the avoidance of
|
||||
doubt, You may only use the credit required by this Section for the
|
||||
purpose of attribution in the manner set out above and, by exercising
|
||||
Your rights under this License, You may not implicitly or explicitly
|
||||
assert or imply any connection with, sponsorship or endorsement by the
|
||||
Original Author, Licensor and/or Attribution Parties, as appropriate,
|
||||
of You or Your use of the Work, without the separate, express prior
|
||||
written permission of the Original Author, Licensor and/or Attribution
|
||||
Parties.
|
||||
d. Except as otherwise agreed in writing by the Licensor or as may be
|
||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
||||
Publicly Perform the Work either by itself or as part of any
|
||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
||||
take other derogatory action in relation to the Work which would be
|
||||
prejudicial to the Original Author's honor or reputation. Licensor
|
||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
||||
of the right granted in Section 3(b) of this License (the right to
|
||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
||||
modification or other derogatory action prejudicial to the Original
|
||||
Author's honor and reputation, the Licensor will waive or not assert,
|
||||
as appropriate, this Section, to the fullest extent permitted by the
|
||||
applicable national law, to enable You to reasonably exercise Your
|
||||
right under Section 3(b) of this License (right to make Adaptations)
|
||||
but not otherwise.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
||||
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
||||
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
||||
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
||||
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
||||
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
|
||||
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Adaptations or Collections
|
||||
from You under this License, however, will not have their licenses
|
||||
terminated provided such individuals or entities remain in full
|
||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
||||
survive any termination of this License.
|
||||
b. Subject to the above terms and conditions, the license granted here is
|
||||
perpetual (for the duration of the applicable copyright in the Work).
|
||||
Notwithstanding the above, Licensor reserves the right to release the
|
||||
Work under different license terms or to stop distributing the Work at
|
||||
any time; provided, however that any such election will not serve to
|
||||
withdraw this License (or any other license that has been, or is
|
||||
required to be, granted under the terms of this License), and this
|
||||
License will continue in full force and effect unless terminated as
|
||||
stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
||||
the Licensor offers to the recipient a license to the Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
||||
offers to the recipient a license to the original Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
c. If any provision of this License is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this License, and without further action
|
||||
by the parties to this agreement, such provision shall be reformed to
|
||||
the minimum extent necessary to make such provision valid and
|
||||
enforceable.
|
||||
d. No term or provision of this License shall be deemed waived and no
|
||||
breach consented to unless such waiver or consent shall be in writing
|
||||
and signed by the party to be charged with such waiver or consent.
|
||||
e. This License constitutes the entire agreement between the parties with
|
||||
respect to the Work licensed here. There are no understandings,
|
||||
agreements or representations with respect to the Work not specified
|
||||
here. Licensor shall not be bound by any additional provisions that
|
||||
may appear in any communication from You. This License may not be
|
||||
modified without the mutual written agreement of the Licensor and You.
|
||||
f. The rights granted under, and the subject matter referenced, in this
|
||||
License were drafted utilizing the terminology of the Berne Convention
|
||||
for the Protection of Literary and Artistic Works (as amended on
|
||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
||||
These rights and subject matter take effect in the relevant
|
||||
jurisdiction in which the License terms are sought to be enforced
|
||||
according to the corresponding provisions of the implementation of
|
||||
those treaty provisions in the applicable national law. If the
|
||||
standard suite of rights granted under applicable copyright law
|
||||
includes additional rights not granted under this License, such
|
||||
additional rights are deemed to be included in the License; this
|
||||
License is not intended to restrict the license of any rights under
|
||||
applicable law.
|
||||
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty
|
||||
whatsoever in connection with the Work. Creative Commons will not be
|
||||
liable to You or any party on any legal theory for any damages
|
||||
whatsoever, including without limitation any general, special,
|
||||
incidental or consequential damages arising in connection to this
|
||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||
Commons has expressly identified itself as the Licensor hereunder, it
|
||||
shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the
|
||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
||||
the use by either party of the trademark "Creative Commons" or any
|
||||
related trademark or logo of Creative Commons without the prior
|
||||
written consent of Creative Commons. Any permitted use will be in
|
||||
compliance with Creative Commons' then-current trademark usage
|
||||
guidelines, as may be published on its website or otherwise made
|
||||
available upon request from time to time. For the avoidance of doubt,
|
||||
this trademark restriction does not form part of the License.
|
||||
|
||||
Creative Commons may be contacted at https://creativecommons.org/.
|
||||
19
dist/english_plurals/README.md
vendored
@@ -1,19 +0,0 @@
|
||||
# English Plurals
|
||||
|
||||
Qt has "Translation Rules for Plurals", small example
|
||||
|
||||
// Take a source line like
|
||||
tr("Building: %n shader(s)", "", i)
|
||||
|
||||
// i = 1:
|
||||
Building: 1 shader
|
||||
// i = 2:
|
||||
Building: 2 shaders
|
||||
|
||||
For yuzu the source language used is English, for all other languages handling of plurals is handled by Qt and the translation collaboration site. Handling plurals in the source language (English) requires special consideration.
|
||||
|
||||
With CMake flag GENERATE_QT_TRANSLATION a generated_en.ts file is created from the source. It ignored by git (`.gitignore` in the project root). It is placed in this directory so that the relative refrences with the source code is correct.
|
||||
|
||||
Having the plurals look nice isn't critical, and automation to use translation collaboration sites may require specifing the project language as "Pirate English", so this has been done manually.
|
||||
|
||||
The en.ts in this directory is taken from a build, edited in Qt Linguist and then committed. As the code is in XML, using the tool is not strictly required.
|
||||
67
dist/english_plurals/en.ts
vendored
@@ -1,67 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US" sourcelanguage="en_US">
|
||||
<context>
|
||||
<name>GMainWindow</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/main.cpp" line="2322"/>
|
||||
<source>%n file(s) remaining</source>
|
||||
<translation>
|
||||
<numerusform>%n file remaining</numerusform>
|
||||
<numerusform>%n files remaining</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/main.cpp" line="2377"/>
|
||||
<source>%n file(s) were newly installed
|
||||
</source>
|
||||
<translation>
|
||||
<numerusform>%n file was newly installed
|
||||
</numerusform>
|
||||
<numerusform>%n files were newly installed
|
||||
</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/main.cpp" line="2380"/>
|
||||
<source>%n file(s) were overwritten
|
||||
</source>
|
||||
<translation>
|
||||
<numerusform>%n file was overwritten
|
||||
</numerusform>
|
||||
<numerusform>%n were overwritten
|
||||
</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/main.cpp" line="2382"/>
|
||||
<source>%n file(s) failed to install
|
||||
</source>
|
||||
<translation>
|
||||
<numerusform>%n file failed to install
|
||||
</numerusform>
|
||||
<numerusform>%n files failed to install
|
||||
</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/main.cpp" line="3264"/>
|
||||
<source>Building: %n shader(s)</source>
|
||||
<translation>
|
||||
<numerusform>Building: %n shader</numerusform>
|
||||
<numerusform>Building: %n shaders</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GameListSearchField</name>
|
||||
<message numerus="yes">
|
||||
<location filename="../../src/yuzu/game_list.cpp" line="87"/>
|
||||
<source>%1 of %n result(s)</source>
|
||||
<translation>
|
||||
<numerusform>%1 of %n result</numerusform>
|
||||
<numerusform>%1 of %n results</numerusform>
|
||||
</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
BIN
dist/qt_themes/colorful/icons/16x16/connected.png
vendored
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 607 B |
BIN
dist/qt_themes/colorful/icons/16x16/disconnected.png
vendored
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 784 B |
BIN
dist/qt_themes/colorful/icons/48x48/list-add.png
vendored
|
Before Width: | Height: | Size: 204 B |
BIN
dist/qt_themes/colorful/icons/48x48/plus.png
vendored
Normal file
|
After Width: | Height: | Size: 496 B |
BIN
dist/qt_themes/colorful/icons/48x48/sd_card.png
vendored
|
Before Width: | Height: | Size: 981 B After Width: | Height: | Size: 680 B |
BIN
dist/qt_themes/colorful/icons/48x48/star.png
vendored
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
2
dist/qt_themes/colorful/style.qrc
vendored
@@ -13,7 +13,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/list-add.png">icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
|
||||
|
||||
BIN
dist/qt_themes/colorful_dark/icons/16x16/refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
@@ -3,6 +3,6 @@ Name=colorful_dark
|
||||
Comment=Colorful theme (Dark style)
|
||||
Inherits=colorful
|
||||
Directories=16x16
|
||||
|
||||
|
||||
[16x16]
|
||||
Size=16
|
||||
|
||||
2
dist/qt_themes/colorful_dark/style.qrc
vendored
@@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<file alias="48x48/chip.png">../colorful/icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">../colorful/icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">../qdarkstyle/icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/list-add.png">../colorful/icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/plus.png">../colorful/icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">../colorful/icons/48x48/sd_card.png</file>
|
||||
<file alias="256x256/plus_folder.png">../colorful/icons/256x256/plus_folder.png</file>
|
||||
</qresource>
|
||||
|
||||
BIN
dist/qt_themes/colorful_midnight_blue/icons/16x16/lock.png
vendored
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
dist/qt_themes/colorful_midnight_blue/icons/16x16/refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
dist/qt_themes/colorful_midnight_blue/icons/16x16/view-refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
@@ -6,12 +6,12 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<RCC>
|
||||
<qresource prefix="icons/colorful_midnight_blue">
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/lock.png">../colorful_dark/icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">../qdarkstyle/icons/16x16/view-refresh.png</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">../colorful/icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">../colorful/icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">../colorful/icons/48x48/folder.png</file>
|
||||
<file alias="48x48/list-add.png">../colorful/icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/plus.png">../colorful/icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">../colorful/icons/48x48/sd_card.png</file>
|
||||
<file alias="256x256/plus_folder.png">../colorful/icons/256x256/plus_folder.png</file>
|
||||
</qresource>
|
||||
|
||||
2
dist/qt_themes/default/default.qrc
vendored
@@ -17,7 +17,7 @@ SPDX-License-Identifier: GPL-2.0-or-later
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/list-add.png">icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
<file alias="256x256/yuzu.png">icons/256x256/yuzu.png</file>
|
||||
|
||||
BIN
dist/qt_themes/default/icons/16x16/checked.png
vendored
|
Before Width: | Height: | Size: 414 B After Width: | Height: | Size: 657 B |
BIN
dist/qt_themes/default/icons/16x16/connected.png
vendored
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 269 B |
|
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 517 B |
BIN
dist/qt_themes/default/icons/16x16/disconnected.png
vendored
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 306 B |
BIN
dist/qt_themes/default/icons/16x16/failed.png
vendored
|
Before Width: | Height: | Size: 431 B After Width: | Height: | Size: 524 B |
BIN
dist/qt_themes/default/icons/16x16/lock.png
vendored
|
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 279 B |
BIN
dist/qt_themes/default/icons/16x16/refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 349 B |
BIN
dist/qt_themes/default/icons/256x256/plus_folder.png
vendored
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
dist/qt_themes/default/icons/48x48/bad_folder.png
vendored
|
Before Width: | Height: | Size: 1007 B After Width: | Height: | Size: 1.1 KiB |
BIN
dist/qt_themes/default/icons/48x48/chip.png
vendored
|
Before Width: | Height: | Size: 511 B After Width: | Height: | Size: 15 KiB |
BIN
dist/qt_themes/default/icons/48x48/folder.png
vendored
|
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 410 B |
BIN
dist/qt_themes/default/icons/48x48/list-add.png
vendored
|
Before Width: | Height: | Size: 204 B |
BIN
dist/qt_themes/default/icons/48x48/no_avatar.png
vendored
|
Before Width: | Height: | Size: 678 B After Width: | Height: | Size: 588 B |
BIN
dist/qt_themes/default/icons/48x48/plus.png
vendored
Normal file
|
After Width: | Height: | Size: 316 B |
BIN
dist/qt_themes/default/icons/48x48/sd_card.png
vendored
|
Before Width: | Height: | Size: 561 B After Width: | Height: | Size: 614 B |
BIN
dist/qt_themes/default/icons/48x48/star.png
vendored
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 686 B |
@@ -1,8 +0,0 @@
|
||||
[Icon Theme]
|
||||
Name=default_dark
|
||||
Comment=Colorful theme (Dark style)
|
||||
Inherits=colorful
|
||||
Directories=16x16
|
||||
|
||||
[16x16]
|
||||
Size=16
|
||||
25
dist/qt_themes/default_dark/style.qrc
vendored
@@ -1,25 +0,0 @@
|
||||
<!--
|
||||
SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
-->
|
||||
<RCC>
|
||||
<qresource prefix="icons/default_dark">
|
||||
<file alias="16x16/connected.png">../colorful/icons/16x16/connected.png</file>
|
||||
<file alias="16x16/connected_notification.png">../colorful/icons/16x16/connected_notification.png</file>
|
||||
<file alias="16x16/disconnected.png">../colorful/icons/16x16/disconnected.png</file>
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/lock.png">../colorful_dark/icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">../colorful_dark/icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">../colorful/icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">../colorful/icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">../colorful/icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">../qdarkstyle/icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/list-add.png">../colorful/icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/sd_card.png">../colorful/icons/48x48/sd_card.png</file>
|
||||
<file alias="256x256/plus_folder.png">../colorful/icons/256x256/plus_folder.png</file>
|
||||
</qresource>
|
||||
|
||||
<qresource prefix="default_dark">
|
||||
<file>style.qss</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
687
dist/qt_themes/default_dark/style.qss
vendored
@@ -1,687 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018 yuzu Emulator Project
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
QAbstractSpinBox {
|
||||
min-height: 19px;
|
||||
}
|
||||
|
||||
QPushButton#TogglableStatusBarButton {
|
||||
color: #959595;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#TogglableStatusBarButton:checked {
|
||||
color: palette(text);
|
||||
}
|
||||
|
||||
QPushButton#TogglableStatusBarButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#RendererStatusBarButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#RendererStatusBarButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#RendererStatusBarButton:checked {
|
||||
color: #e85c00;
|
||||
}
|
||||
|
||||
QPushButton#RendererStatusBarButton:!checked {
|
||||
color: #00ccdd;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton {
|
||||
color: #656565;
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton:checked {
|
||||
color: #ff8040;
|
||||
}
|
||||
|
||||
QPushButton#GPUStatusBarButton:!checked {
|
||||
color: #40dd40;
|
||||
}
|
||||
|
||||
QPushButton#DockingStatusBarButton {
|
||||
min-width: 0px;
|
||||
color: palette(text);
|
||||
border: 1px solid transparent;
|
||||
background-color: transparent;
|
||||
padding: 0px 3px 0px 3px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
QPushButton#DockingStatusBarButton:hover {
|
||||
border: 1px solid #76797C;
|
||||
}
|
||||
|
||||
QPushButton#buttonRefreshDevices {
|
||||
min-width: 21px;
|
||||
min-height: 21px;
|
||||
max-width: 21px;
|
||||
max-height: 21px;
|
||||
}
|
||||
|
||||
QWidget#bottomPerGameInput,
|
||||
QWidget#topControllerApplet,
|
||||
QWidget#bottomControllerApplet,
|
||||
QGroupBox#groupPlayer1Connected:checked,
|
||||
QGroupBox#groupPlayer2Connected:checked,
|
||||
QGroupBox#groupPlayer3Connected:checked,
|
||||
QGroupBox#groupPlayer4Connected:checked,
|
||||
QGroupBox#groupPlayer5Connected:checked,
|
||||
QGroupBox#groupPlayer6Connected:checked,
|
||||
QGroupBox#groupPlayer7Connected:checked,
|
||||
QGroupBox#groupPlayer8Connected:checked {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
QWidget#topControllerApplet {
|
||||
border-bottom: 1px solid #828790
|
||||
}
|
||||
|
||||
QWidget#bottomPerGameInput,
|
||||
QWidget#bottomControllerApplet {
|
||||
border-top: 1px solid #828790
|
||||
}
|
||||
|
||||
QWidget#topPerGameInput,
|
||||
QWidget#middleControllerApplet {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
QWidget#topPerGameInput QComboBox,
|
||||
QWidget#middleControllerApplet QComboBox {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
QWidget#connectedControllers {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QWidget#playersSupported,
|
||||
QWidget#controllersSupported,
|
||||
QWidget#controllerSupported1,
|
||||
QWidget#controllerSupported2,
|
||||
QWidget#controllerSupported3,
|
||||
QWidget#controllerSupported4,
|
||||
QWidget#controllerSupported5,
|
||||
QWidget#controllerSupported6 {
|
||||
border: none;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QGroupBox#groupPlayer1Connected,
|
||||
QGroupBox#groupPlayer2Connected,
|
||||
QGroupBox#groupPlayer3Connected,
|
||||
QGroupBox#groupPlayer4Connected,
|
||||
QGroupBox#groupPlayer5Connected,
|
||||
QGroupBox#groupPlayer6Connected,
|
||||
QGroupBox#groupPlayer7Connected,
|
||||
QGroupBox#groupPlayer8Connected {
|
||||
border: 1px solid #828790;
|
||||
border-radius: 3px;
|
||||
padding: 0px;
|
||||
min-height: 98px;
|
||||
max-height: 98px;
|
||||
}
|
||||
|
||||
QGroupBox#groupPlayer1Connected:unchecked,
|
||||
QGroupBox#groupPlayer2Connected:unchecked,
|
||||
QGroupBox#groupPlayer3Connected:unchecked,
|
||||
QGroupBox#groupPlayer4Connected:unchecked,
|
||||
QGroupBox#groupPlayer5Connected:unchecked,
|
||||
QGroupBox#groupPlayer6Connected:unchecked,
|
||||
QGroupBox#groupPlayer7Connected:unchecked,
|
||||
QGroupBox#groupPlayer8Connected:unchecked {
|
||||
border: 1px solid #d9d9d9;
|
||||
}
|
||||
|
||||
QGroupBox#groupPlayer1Connected::title,
|
||||
QGroupBox#groupPlayer2Connected::title,
|
||||
QGroupBox#groupPlayer3Connected::title,
|
||||
QGroupBox#groupPlayer4Connected::title,
|
||||
QGroupBox#groupPlayer5Connected::title,
|
||||
QGroupBox#groupPlayer6Connected::title,
|
||||
QGroupBox#groupPlayer7Connected::title,
|
||||
QGroupBox#groupPlayer8Connected::title {
|
||||
subcontrol-origin: margin;
|
||||
subcontrol-position: top left;
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
padding-top: 1px;
|
||||
margin-left: 0px;
|
||||
margin-right: -4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
QCheckBox#checkboxPlayer1Connected,
|
||||
QCheckBox#checkboxPlayer2Connected,
|
||||
QCheckBox#checkboxPlayer3Connected,
|
||||
QCheckBox#checkboxPlayer4Connected,
|
||||
QCheckBox#checkboxPlayer5Connected,
|
||||
QCheckBox#checkboxPlayer6Connected,
|
||||
QCheckBox#checkboxPlayer7Connected,
|
||||
QCheckBox#checkboxPlayer8Connected {
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
QWidget#Player1LEDs QCheckBox,
|
||||
QWidget#Player2LEDs QCheckBox,
|
||||
QWidget#Player3LEDs QCheckBox,
|
||||
QWidget#Player4LEDs QCheckBox,
|
||||
QWidget#Player5LEDs QCheckBox,
|
||||
QWidget#Player6LEDs QCheckBox,
|
||||
QWidget#Player7LEDs QCheckBox,
|
||||
QWidget#Player8LEDs QCheckBox {
|
||||
spacing: 0px;
|
||||
}
|
||||
|
||||
QWidget#Player1LEDs QCheckBox::indicator,
|
||||
QWidget#Player2LEDs QCheckBox::indicator,
|
||||
QWidget#Player3LEDs QCheckBox::indicator,
|
||||
QWidget#Player4LEDs QCheckBox::indicator,
|
||||
QWidget#Player5LEDs QCheckBox::indicator,
|
||||
QWidget#Player6LEDs QCheckBox::indicator,
|
||||
QWidget#Player7LEDs QCheckBox::indicator,
|
||||
QWidget#Player8LEDs QCheckBox::indicator {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer1Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer2Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer3Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer4Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer5Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer6Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer7Connected::indicator,
|
||||
QWidget#bottomPerGameInput QCheckBox#checkboxPlayer8Connected::indicator {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
|
||||
QCheckBox#checkboxPlayer1Connected::indicator,
|
||||
QCheckBox#checkboxPlayer2Connected::indicator,
|
||||
QCheckBox#checkboxPlayer3Connected::indicator,
|
||||
QCheckBox#checkboxPlayer4Connected::indicator,
|
||||
QCheckBox#checkboxPlayer5Connected::indicator,
|
||||
QCheckBox#checkboxPlayer6Connected::indicator,
|
||||
QCheckBox#checkboxPlayer7Connected::indicator,
|
||||
QCheckBox#checkboxPlayer8Connected::indicator {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
QGroupBox#groupPlayer1Connected::indicator,
|
||||
QGroupBox#groupPlayer2Connected::indicator,
|
||||
QGroupBox#groupPlayer3Connected::indicator,
|
||||
QGroupBox#groupPlayer4Connected::indicator,
|
||||
QGroupBox#groupPlayer5Connected::indicator,
|
||||
QGroupBox#groupPlayer6Connected::indicator,
|
||||
QGroupBox#groupPlayer7Connected::indicator,
|
||||
QGroupBox#groupPlayer8Connected::indicator {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
QWidget#Player1LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player2LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player3LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player4LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player5LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player6LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player7LEDs QCheckBox::indicator:checked,
|
||||
QWidget#Player8LEDs QCheckBox::indicator:checked,
|
||||
QGroupBox#groupPlayer1Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer2Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer3Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer4Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer5Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer6Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer7Connected::indicator:checked,
|
||||
QGroupBox#groupPlayer8Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer1Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer2Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer3Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer4Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer5Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer6Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer7Connected::indicator:checked,
|
||||
QCheckBox#checkboxPlayer8Connected::indicator:checked,
|
||||
QGroupBox#groupConnectedController::indicator:checked {
|
||||
border-radius: 2px;
|
||||
border: 1px solid #929192;
|
||||
background: #39ff14;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QWidget#Player1LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player2LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player3LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player4LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player5LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player6LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player7LEDs QCheckBox::indicator:unchecked,
|
||||
QWidget#Player8LEDs QCheckBox::indicator:unchecked,
|
||||
QGroupBox#groupPlayer1Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer2Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer3Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer4Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer5Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer6Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer7Connected::indicator:unchecked,
|
||||
QGroupBox#groupPlayer8Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer1Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer2Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer3Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer4Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer5Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer6Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer7Connected::indicator:unchecked,
|
||||
QCheckBox#checkboxPlayer8Connected::indicator:unchecked,
|
||||
QGroupBox#groupConnectedController::indicator:unchecked {
|
||||
border-radius: 2px;
|
||||
border: 1px solid #929192;
|
||||
background: transparent;
|
||||
image: none;
|
||||
}
|
||||
|
||||
QWidget#controllerPlayer1,
|
||||
QWidget#controllerPlayer2,
|
||||
QWidget#controllerPlayer3,
|
||||
QWidget#controllerPlayer4,
|
||||
QWidget#controllerPlayer5,
|
||||
QWidget#controllerPlayer6,
|
||||
QWidget#controllerPlayer7,
|
||||
QWidget#controllerPlayer8 {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog,
|
||||
QStackedWidget#topOSK {
|
||||
background: rgba(51, 51, 51, .9);
|
||||
}
|
||||
|
||||
|
||||
QDialog#OverlayDialog,
|
||||
QStackedWidget#stackedDialog {
|
||||
background: rgba(51, 51, 51, .7);
|
||||
}
|
||||
|
||||
QWidget#boxOSK,
|
||||
QWidget#lineOSK,
|
||||
QWidget#richDialog,
|
||||
QWidget#lineDialog {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
QStackedWidget#bottomOSK,
|
||||
QWidget#contentDialog,
|
||||
QWidget#contentRichDialog {
|
||||
background: rgba(240, 240, 240, 1);
|
||||
}
|
||||
|
||||
QWidget#contentDialog,
|
||||
QWidget#contentRichDialog {
|
||||
margin: 5px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
QWidget#buttonsDialog,
|
||||
QWidget#buttonsRichDialog {
|
||||
margin: 5px;
|
||||
border-top: 2px solid rgba(44, 44, 44, 1);
|
||||
}
|
||||
|
||||
QWidget#legendOSKnum {
|
||||
border-top: 1px solid rgba(44, 44, 44, 1);
|
||||
}
|
||||
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::vertical {
|
||||
background: #cdcdcd;
|
||||
width: 15px;
|
||||
margin: 15px 3px 15px 3px;
|
||||
border: 1px transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::horizoncal {
|
||||
background: #cdcdcd;
|
||||
height: 15px;
|
||||
margin: 3px 15px 3px 15px;
|
||||
border: 1px transparent;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::handle {
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
min-height: 5px;
|
||||
min-width: 5px;
|
||||
}
|
||||
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::add-line,
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::sub-line,
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::add-page,
|
||||
QStackedWidget#stackedDialog QTextBrowser QScrollBar::sub-page {
|
||||
background: none;
|
||||
}
|
||||
|
||||
QWidget#inputOSK {
|
||||
border-bottom: 3px solid rgba(255, 255, 255, .9);
|
||||
}
|
||||
|
||||
QWidget#inputOSK QLineEdit {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
QWidget#inputBoxOSK {
|
||||
border: 2px solid rgba(255, 255, 255, .9);
|
||||
}
|
||||
|
||||
QWidget#inputBoxOSK QTextEdit {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
QWidget#richDialog QTextBrowser {
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 35px 65px;
|
||||
}
|
||||
|
||||
|
||||
QWidget#lineOSK QLabel#label_header {
|
||||
color: #f0f0f0;
|
||||
}
|
||||
|
||||
QWidget#lineOSK QLabel#label_sub,
|
||||
QWidget#lineOSK QLabel#label_characters,
|
||||
QWidget#boxOSK QLabel#label_characters_box {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
QWidget#contentDialog QLabel#label_title,
|
||||
QWidget#contentRichDialog QLabel#label_title_rich {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
QWidget#contentDialog QLabel#label_dialog {
|
||||
padding: 20px 65px;
|
||||
}
|
||||
|
||||
QWidget#contentDialog QLabel#label_title,
|
||||
QWidget#contentRichDialog QLabel#label_title_rich {
|
||||
padding: 0px 65px;
|
||||
}
|
||||
|
||||
QDialog#OverlayDialog QPushButton {
|
||||
color: rgba(49, 79, 239, 1);
|
||||
background: transparent;
|
||||
border: none;
|
||||
padding: 0px;
|
||||
min-width: 0px;
|
||||
}
|
||||
|
||||
QDialog#OverlayDialog QPushButton:focus,
|
||||
QDialog#OverlayDialog QPushButton:hover {
|
||||
color: rgba(49, 79, 239, 1);
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border: 5px solid rgba(148, 250, 202, 1);
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QDialog#OverlayDialog QPushButton:pressed {
|
||||
color: rgba(240, 240, 240, 1);
|
||||
background: rgba(150, 150, 150, 1);
|
||||
border: 5px solid rgba(148, 250, 202, 1);
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton {
|
||||
background: rgba(232, 232, 232, 1);
|
||||
border: 2px solid rgba(240, 240, 240, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift {
|
||||
background: rgba(218, 218, 218, 1);
|
||||
border: 2px solid rgba(240, 240, 240, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num {
|
||||
color: rgba(240, 240, 240, 1);
|
||||
background: rgba(44, 44, 44, 1);
|
||||
border: 2px solid rgba(240, 240, 240, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num {
|
||||
color: rgba(240, 240, 240, 1);
|
||||
background: rgba(49, 79, 239, 1);
|
||||
border: 2px solid rgba(240, 240, 240, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num:focus,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num:focus,
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num:hover,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num:hover {
|
||||
color: rgba(0, 0, 0, 1);
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border: 5px solid rgba(148, 250, 202, 1);
|
||||
border-radius: 6px;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num:pressed,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num:pressed {
|
||||
color: rgba(240, 240, 240, 1);
|
||||
background: rgba(150, 150, 150, 1);
|
||||
border: 5px solid rgba(148, 250, 202, 1);
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num {
|
||||
image: url(:/overlay/osk_button_B.png);
|
||||
image-position: right;
|
||||
qproperty-icon: url(:/overlay/osk_button_backspace.png);
|
||||
qproperty-iconSize: 36px;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift {
|
||||
image: url(:/overlay/osk_button_Y.png);
|
||||
image-position: right;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num {
|
||||
image: url(:/overlay/osk_button_plus.png);
|
||||
image-position: right;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift {
|
||||
image: url(:/overlay/osk_button_shift_lock_off.png);
|
||||
image-position: left;
|
||||
qproperty-icon: url(:/overlay/osk_button_shift.png);
|
||||
qproperty-iconSize: 36px;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_shift_shift {
|
||||
image: url(:/overlay/osk_button_shift_lock_off.png);
|
||||
image-position: left;
|
||||
qproperty-icon: url(:/overlay/osk_button_shift_on.png);
|
||||
qproperty-iconSize: 36px;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_left_bracket,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_right_bracket,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_left_parenthesis,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_right_parenthesis {
|
||||
padding-bottom: 7px;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#titleOSK QLabel {
|
||||
background: transparent;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_L,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_L_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_L_num {
|
||||
image: url(:/overlay/button_L.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_left,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_left_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_left_num {
|
||||
image: url(:/overlay/arrow_left.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_R,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_R_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_R_num {
|
||||
image: url(:/overlay/button_R.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_right,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_right_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#arrow_right_num {
|
||||
image: url(:/overlay/arrow_right.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_press_stick,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_press_stick_shift {
|
||||
image: url(:/overlay/button_press_stick.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_X,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_X_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_X_num {
|
||||
image: url(:/overlay/button_X.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_A,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_A_shift,
|
||||
QDialog#QtSoftwareKeyboardDialog QWidget#button_A_num {
|
||||
image: url(:/overlay/button_A.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num:disabled {
|
||||
color: rgba(164, 164, 164, 1);
|
||||
background-color: rgba(218, 218, 218, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_at:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_slash:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_percent:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_1:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_2:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_3:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_4:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_5:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_6:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_7:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_8:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_9:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_0:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_return:disabled {
|
||||
color: rgba(164, 164, 164, 1);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_ok_num:disabled {
|
||||
image: url(:/overlay/osk_button_plus_disabled.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_shift:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_backspace_num:disabled {
|
||||
image: url(:/overlay/osk_button_B_disabled.png);
|
||||
}
|
||||
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space:disabled,
|
||||
QDialog#QtSoftwareKeyboardDialog QPushButton#button_space_shift:disabled {
|
||||
image: url(:/overlay/osk_button_Y_disabled.png);
|
||||
}
|
||||
BIN
dist/qt_themes/qdarkstyle/icons/16x16/connected.png
vendored
|
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 397 B |
|
Before Width: | Height: | Size: 760 B After Width: | Height: | Size: 526 B |
|
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 444 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/lock.png
vendored
|
Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 304 B |
BIN
dist/qt_themes/qdarkstyle/icons/16x16/refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.4 KiB |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/bad_folder.png
vendored
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/chip.png
vendored
|
Before Width: | Height: | Size: 551 B After Width: | Height: | Size: 15 KiB |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/folder.png
vendored
|
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 542 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/list-add.png
vendored
|
Before Width: | Height: | Size: 204 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/no_avatar.png
vendored
|
Before Width: | Height: | Size: 763 B After Width: | Height: | Size: 708 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/plus.png
vendored
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/sd_card.png
vendored
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 676 B |
BIN
dist/qt_themes/qdarkstyle/icons/48x48/star.png
vendored
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 725 B |
2
dist/qt_themes/qdarkstyle/style.qrc
vendored
@@ -10,7 +10,7 @@
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/list-add.png">icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
|
||||
|
||||
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/16x16/lock.png
vendored
Normal file
|
After Width: | Height: | Size: 304 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/16x16/refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/16x16/view-refresh.png
vendored
Normal file
|
After Width: | Height: | Size: 362 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/256x256/plus_folder.png
vendored
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/bad_folder.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/chip.png
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/folder.png
vendored
Normal file
|
After Width: | Height: | Size: 542 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/plus.png
vendored
Normal file
|
After Width: | Height: | Size: 339 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/sd_card.png
vendored
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
dist/qt_themes/qdarkstyle_midnight_blue/icons/48x48/star.png
vendored
Normal file
|
After Width: | Height: | Size: 725 B |
@@ -1,16 +1,15 @@
|
||||
<RCC>
|
||||
<qresource prefix="icons/qdarkstyle_midnight_blue">
|
||||
<file alias="index.theme">icons/index.theme</file>
|
||||
<file alias="16x16/lock.png">../qdarkstyle/icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">../qdarkstyle/icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">../qdarkstyle/icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">../qdarkstyle/icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">../qdarkstyle/icons/48x48/folder.png</file>
|
||||
<file alias="48x48/no_avatar.png">../qdarkstyle/icons/48x48/no_avatar.png</file>
|
||||
<file alias="48x48/list-add.png">../qdarkstyle/icons/48x48/list-add.png</file>
|
||||
<file alias="48x48/sd_card.png">../qdarkstyle/icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">../qdarkstyle/icons/48x48/star.png</file>
|
||||
<file alias="256x256/plus_folder.png">../qdarkstyle/icons/256x256/plus_folder.png</file>
|
||||
<file alias="16x16/lock.png">icons/16x16/lock.png</file>
|
||||
<file alias="16x16/view-refresh.png">icons/16x16/view-refresh.png</file>
|
||||
<file alias="48x48/bad_folder.png">icons/48x48/bad_folder.png</file>
|
||||
<file alias="48x48/chip.png">icons/48x48/chip.png</file>
|
||||
<file alias="48x48/folder.png">icons/48x48/folder.png</file>
|
||||
<file alias="48x48/plus.png">icons/48x48/plus.png</file>
|
||||
<file alias="48x48/sd_card.png">icons/48x48/sd_card.png</file>
|
||||
<file alias="48x48/star.png">icons/48x48/star.png</file>
|
||||
<file alias="256x256/plus_folder.png">icons/256x256/plus_folder.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="qss_icons">
|
||||
<file>rc/arrow_down.png</file>
|
||||
|
||||
@@ -162,7 +162,6 @@ add_subdirectory(video_core)
|
||||
add_subdirectory(network)
|
||||
add_subdirectory(input_common)
|
||||
add_subdirectory(shader_recompiler)
|
||||
add_subdirectory(dedicated_room)
|
||||
|
||||
if (YUZU_TESTS)
|
||||
add_subdirectory(tests)
|
||||
|
||||
@@ -185,9 +185,6 @@ public:
|
||||
constexpr s32 max{std::numeric_limits<s16>::max()};
|
||||
|
||||
auto yuzu_volume{Settings::Volume()};
|
||||
if (yuzu_volume > 1.0f) {
|
||||
yuzu_volume = 0.6f + 20 * std::log10(yuzu_volume);
|
||||
}
|
||||
auto volume{system_volume * device_volume * yuzu_volume};
|
||||
|
||||
if (system_channels == 6 && device_channels == 2) {
|
||||
|
||||
@@ -124,7 +124,6 @@ add_library(common STATIC
|
||||
settings.h
|
||||
settings_input.cpp
|
||||
settings_input.h
|
||||
socket_types.h
|
||||
spin_lock.cpp
|
||||
spin_lock.h
|
||||
stream.cpp
|
||||
|
||||
@@ -8,11 +8,12 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "common/common_types.h"
|
||||
#include "common/socket_types.h"
|
||||
#include "web_service/web_result.h"
|
||||
|
||||
namespace AnnounceMultiplayerRoom {
|
||||
|
||||
using MacAddress = std::array<u8, 6>;
|
||||
|
||||
struct GameInfo {
|
||||
std::string name{""};
|
||||
u64 id{0};
|
||||
@@ -23,7 +24,7 @@ struct Member {
|
||||
std::string nickname;
|
||||
std::string display_name;
|
||||
std::string avatar_url;
|
||||
Network::IPv4Address fake_ip;
|
||||
MacAddress mac_address;
|
||||
GameInfo game;
|
||||
};
|
||||
|
||||
@@ -74,7 +75,10 @@ public:
|
||||
const bool has_password, const GameInfo& preferred_game) = 0;
|
||||
/**
|
||||
* Adds a player information to the data that gets announced
|
||||
* @param member The player to add
|
||||
* @param nickname The nickname of the player
|
||||
* @param mac_address The MAC Address of the player
|
||||
* @param game_id The title id of the game the player plays
|
||||
* @param game_name The name of the game the player plays
|
||||
*/
|
||||
virtual void AddPlayer(const Member& member) = 0;
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ float Volume() {
|
||||
if (values.audio_muted) {
|
||||
return 0.0f;
|
||||
}
|
||||
return values.volume.GetValue() / static_cast<f32>(values.volume.GetDefault());
|
||||
return values.volume.GetValue() / 100.0f;
|
||||
}
|
||||
|
||||
void UpdateRescalingInfo() {
|
||||
|
||||
@@ -374,7 +374,7 @@ struct Values {
|
||||
Setting<std::string> audio_output_device_id{"auto", "output_device"};
|
||||
Setting<std::string> audio_input_device_id{"auto", "input_device"};
|
||||
Setting<bool> audio_muted{false, "audio_muted"};
|
||||
SwitchableSetting<u8, true> volume{100, 0, 200, "volume"};
|
||||
SwitchableSetting<u8, true> volume{100, 0, 100, "volume"};
|
||||
Setting<bool> dump_audio_commands{false, "dump_audio_commands"};
|
||||
|
||||
// Core
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
||||
namespace Network {
|
||||
|
||||
/// Address families
|
||||
enum class Domain : u8 {
|
||||
INET, ///< Address family for IPv4
|
||||
};
|
||||
|
||||
/// Socket types
|
||||
enum class Type {
|
||||
STREAM,
|
||||
DGRAM,
|
||||
RAW,
|
||||
SEQPACKET,
|
||||
};
|
||||
|
||||
/// Protocol values for sockets
|
||||
enum class Protocol : u8 {
|
||||
ICMP,
|
||||
TCP,
|
||||
UDP,
|
||||
};
|
||||
|
||||
/// Shutdown mode
|
||||
enum class ShutdownHow {
|
||||
RD,
|
||||
WR,
|
||||
RDWR,
|
||||
};
|
||||
|
||||
/// Array of IPv4 address
|
||||
using IPv4Address = std::array<u8, 4>;
|
||||
|
||||
/// Cross-platform sockaddr structure
|
||||
struct SockAddrIn {
|
||||
Domain family;
|
||||
IPv4Address ip;
|
||||
u16 portno;
|
||||
};
|
||||
|
||||
constexpr u32 FLAG_MSG_PEEK = 0x2;
|
||||
constexpr u32 FLAG_MSG_DONTWAIT = 0x80;
|
||||
constexpr u32 FLAG_O_NONBLOCK = 0x800;
|
||||
|
||||
} // namespace Network
|
||||
@@ -12,6 +12,7 @@
|
||||
#pragma intrinsic(_udiv128)
|
||||
#else
|
||||
#include <cstring>
|
||||
#include <x86intrin.h>
|
||||
#endif
|
||||
|
||||
#include "common/common_types.h"
|
||||
|
||||
@@ -502,10 +502,9 @@ add_library(core STATIC
|
||||
hle/service/jit/jit.h
|
||||
hle/service/lbl/lbl.cpp
|
||||
hle/service/lbl/lbl.h
|
||||
hle/service/ldn/ldn_results.h
|
||||
hle/service/ldn/errors.h
|
||||
hle/service/ldn/ldn.cpp
|
||||
hle/service/ldn/ldn.h
|
||||
hle/service/ldn/ldn_types.h
|
||||
hle/service/ldr/ldr.cpp
|
||||
hle/service/ldr/ldr.h
|
||||
hle/service/lm/lm.cpp
|
||||
@@ -724,8 +723,6 @@ add_library(core STATIC
|
||||
internal_network/network_interface.cpp
|
||||
internal_network/network_interface.h
|
||||
internal_network/sockets.h
|
||||
internal_network/socket_proxy.cpp
|
||||
internal_network/socket_proxy.h
|
||||
loader/deconstructed_rom_directory.cpp
|
||||
loader/deconstructed_rom_directory.h
|
||||
loader/kip.cpp
|
||||
|
||||
@@ -31,7 +31,7 @@ AnnounceMultiplayerSession::AnnounceMultiplayerSession(Network::RoomNetwork& roo
|
||||
}
|
||||
|
||||
WebService::WebResult AnnounceMultiplayerSession::Register() {
|
||||
auto room = room_network.GetRoom().lock();
|
||||
std::shared_ptr<Network::Room> room = room_network.GetRoom().lock();
|
||||
if (!room) {
|
||||
return WebService::WebResult{WebService::WebResult::Code::LibError,
|
||||
"Network is not initialized", ""};
|
||||
@@ -102,7 +102,7 @@ void AnnounceMultiplayerSession::UpdateBackendData(std::shared_ptr<Network::Room
|
||||
void AnnounceMultiplayerSession::AnnounceMultiplayerLoop() {
|
||||
// Invokes all current bound error callbacks.
|
||||
const auto ErrorCallback = [this](WebService::WebResult result) {
|
||||
std::lock_guard lock(callback_mutex);
|
||||
std::lock_guard<std::mutex> lock(callback_mutex);
|
||||
for (auto callback : error_callbacks) {
|
||||
(*callback)(result);
|
||||
}
|
||||
@@ -120,7 +120,7 @@ void AnnounceMultiplayerSession::AnnounceMultiplayerLoop() {
|
||||
std::future<WebService::WebResult> future;
|
||||
while (!shutdown_event.WaitUntil(update_time)) {
|
||||
update_time += announce_time_interval;
|
||||
auto room = room_network.GetRoom().lock();
|
||||
std::shared_ptr<Network::Room> room = room_network.GetRoom().lock();
|
||||
if (!room) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -195,16 +195,14 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||
if (page_table) {
|
||||
config.page_table = reinterpret_cast<std::array<std::uint8_t*, NUM_PAGE_TABLE_ENTRIES>*>(
|
||||
page_table->pointers.data());
|
||||
config.absolute_offset_page_table = true;
|
||||
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||
|
||||
config.fastmem_pointer = page_table->fastmem_arena;
|
||||
|
||||
config.fastmem_exclusive_access = config.fastmem_pointer != nullptr;
|
||||
config.recompile_on_exclusive_fastmem_failure = true;
|
||||
}
|
||||
config.absolute_offset_page_table = true;
|
||||
config.page_table_pointer_mask_bits = Common::PageTable::ATTRIBUTE_BITS;
|
||||
config.detect_misaligned_access_via_page_table = 16 | 32 | 64 | 128;
|
||||
config.only_detect_misalignment_via_page_table_on_page_boundary = true;
|
||||
config.fastmem_exclusive_access = true;
|
||||
config.recompile_on_exclusive_fastmem_failure = true;
|
||||
|
||||
// Multi-process state
|
||||
config.processor_id = core_index;
|
||||
@@ -256,7 +254,6 @@ std::shared_ptr<Dynarmic::A32::Jit> ARM_Dynarmic_32::MakeJit(Common::PageTable*
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem) {
|
||||
config.fastmem_pointer = nullptr;
|
||||
config.fastmem_exclusive_access = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||
config.fastmem_exclusive_access = false;
|
||||
|
||||
@@ -250,7 +250,7 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
||||
config.fastmem_address_space_bits = address_space_bits;
|
||||
config.silently_mirror_fastmem = false;
|
||||
|
||||
config.fastmem_exclusive_access = config.fastmem_pointer != nullptr;
|
||||
config.fastmem_exclusive_access = true;
|
||||
config.recompile_on_exclusive_fastmem_failure = true;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,6 @@ std::shared_ptr<Dynarmic::A64::Jit> ARM_Dynarmic_64::MakeJit(Common::PageTable*
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem) {
|
||||
config.fastmem_pointer = nullptr;
|
||||
config.fastmem_exclusive_access = false;
|
||||
}
|
||||
if (!Settings::values.cpuopt_fastmem_exclusives) {
|
||||
config.fastmem_exclusive_access = false;
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
#include "core/core.h"
|
||||
#include "core/core_timing.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
using Callback = Dynarmic::A32::Coprocessor::Callback;
|
||||
using CallbackOrAccessOneWord = Dynarmic::A32::Coprocessor::CallbackOrAccessOneWord;
|
||||
using CallbackOrAccessTwoWords = Dynarmic::A32::Coprocessor::CallbackOrAccessTwoWords;
|
||||
@@ -51,31 +47,12 @@ CallbackOrAccessOneWord DynarmicCP15::CompileSendOneWord(bool two, unsigned opc1
|
||||
switch (opc2) {
|
||||
case 4:
|
||||
// CP15_DATA_SYNC_BARRIER
|
||||
return Callback{
|
||||
[](Dynarmic::A32::Jit*, void*, std::uint32_t, std::uint32_t) -> std::uint64_t {
|
||||
#ifdef _MSC_VER
|
||||
_mm_mfence();
|
||||
_mm_lfence();
|
||||
#else
|
||||
asm volatile("mfence\n\tlfence\n\t" : : : "memory");
|
||||
#endif
|
||||
return 0;
|
||||
},
|
||||
std::nullopt,
|
||||
};
|
||||
// This is a dummy write, we ignore the value written here.
|
||||
return &dummy_value;
|
||||
case 5:
|
||||
// CP15_DATA_MEMORY_BARRIER
|
||||
return Callback{
|
||||
[](Dynarmic::A32::Jit*, void*, std::uint32_t, std::uint32_t) -> std::uint64_t {
|
||||
#ifdef _MSC_VER
|
||||
_mm_mfence();
|
||||
#else
|
||||
asm volatile("mfence\n\t" : : : "memory");
|
||||
#endif
|
||||
return 0;
|
||||
},
|
||||
std::nullopt,
|
||||
};
|
||||
// This is a dummy write, we ignore the value written here.
|
||||
return &dummy_value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@ public:
|
||||
ARM_Dynarmic_32& parent;
|
||||
u32 uprw = 0;
|
||||
u32 uro = 0;
|
||||
|
||||
friend class ARM_Dynarmic_32;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
@@ -287,8 +287,7 @@ void IPSwitchCompiler::Parse() {
|
||||
std::copy(value.begin(), value.end(), std::back_inserter(replace));
|
||||
} else {
|
||||
// hex replacement
|
||||
const auto value =
|
||||
patch_line.substr(9, patch_line.find_first_of(" /\r\n", 9) - 9);
|
||||
const auto value = patch_line.substr(9);
|
||||
replace = Common::HexStringToVector(value, is_little_endian);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/thread.h"
|
||||
#include "core/hid/emulated_controller.h"
|
||||
#include "core/hid/input_converter.h"
|
||||
|
||||
@@ -85,19 +84,18 @@ void EmulatedController::ReloadFromSettings() {
|
||||
motion_params[index] = Common::ParamPackage(player.motions[index]);
|
||||
}
|
||||
|
||||
controller.colors_state.fullkey = {
|
||||
.body = GetNpadColor(player.body_color_left),
|
||||
.button = GetNpadColor(player.button_color_left),
|
||||
};
|
||||
controller.colors_state.left = {
|
||||
.body = GetNpadColor(player.body_color_left),
|
||||
.button = GetNpadColor(player.button_color_left),
|
||||
.body = player.body_color_left,
|
||||
.button = player.button_color_left,
|
||||
};
|
||||
controller.colors_state.left = {
|
||||
.body = GetNpadColor(player.body_color_right),
|
||||
.button = GetNpadColor(player.button_color_right),
|
||||
|
||||
controller.colors_state.right = {
|
||||
.body = player.body_color_right,
|
||||
.button = player.button_color_right,
|
||||
};
|
||||
|
||||
controller.colors_state.fullkey = controller.colors_state.left;
|
||||
|
||||
// Other or debug controller should always be a pro controller
|
||||
if (npad_id_type != NpadIdType::Other) {
|
||||
SetNpadStyleIndex(MapSettingsTypeToNPad(player.controller_type));
|
||||
@@ -951,9 +949,6 @@ bool EmulatedController::TestVibration(std::size_t device_index) {
|
||||
// Send a slight vibration to test for rumble support
|
||||
output_devices[device_index]->SetVibration(test_vibration);
|
||||
|
||||
// Wait for about 15ms to ensure the controller is ready for the stop command
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(15));
|
||||
|
||||
// Stop any vibration and return the result
|
||||
return output_devices[device_index]->SetVibration(zero_vibration) ==
|
||||
Common::Input::VibrationError::None;
|
||||
@@ -1315,15 +1310,6 @@ const CameraState& EmulatedController::GetCamera() const {
|
||||
return controller.camera_state;
|
||||
}
|
||||
|
||||
NpadColor EmulatedController::GetNpadColor(u32 color) {
|
||||
return {
|
||||
.r = static_cast<u8>((color >> 16) & 0xFF),
|
||||
.g = static_cast<u8>((color >> 8) & 0xFF),
|
||||
.b = static_cast<u8>(color & 0xFF),
|
||||
.a = 0xff,
|
||||
};
|
||||
}
|
||||
|
||||
void EmulatedController::TriggerOnChange(ControllerTriggerType type, bool is_npad_service_update) {
|
||||
std::scoped_lock lock{callback_mutex};
|
||||
for (const auto& poller_pair : callback_list) {
|
||||
|
||||
@@ -424,13 +424,6 @@ private:
|
||||
*/
|
||||
void SetCamera(const Common::Input::CallbackStatus& callback);
|
||||
|
||||
/**
|
||||
* Converts a color format from bgra to rgba
|
||||
* @param color in bgra format
|
||||
* @return NpadColor in rgba format
|
||||
*/
|
||||
NpadColor GetNpadColor(u32 color);
|
||||
|
||||
/**
|
||||
* Triggers a callback that something has changed on the controller status
|
||||
* @param type Input type of the event to trigger
|
||||
|
||||
@@ -327,18 +327,10 @@ struct TouchState {
|
||||
};
|
||||
static_assert(sizeof(TouchState) == 0x28, "Touchstate is an invalid size");
|
||||
|
||||
struct NpadColor {
|
||||
u8 r{};
|
||||
u8 g{};
|
||||
u8 b{};
|
||||
u8 a{};
|
||||
};
|
||||
static_assert(sizeof(NpadColor) == 4, "NpadColor is an invalid size");
|
||||
|
||||
// This is nn::hid::NpadControllerColor
|
||||
struct NpadControllerColor {
|
||||
NpadColor body{};
|
||||
NpadColor button{};
|
||||
u32 body{};
|
||||
u32 button{};
|
||||
};
|
||||
static_assert(sizeof(NpadControllerColor) == 8, "NpadControllerColor is an invalid size");
|
||||
|
||||
|
||||
@@ -163,51 +163,28 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
}
|
||||
LOG_DEBUG(Service_HID, "Npad connected {}", npad_id);
|
||||
const auto controller_type = controller.device->GetNpadStyleIndex();
|
||||
const auto& body_colors = controller.device->GetColors();
|
||||
const auto& battery_level = controller.device->GetBattery();
|
||||
auto* shared_memory = controller.shared_memory;
|
||||
if (controller_type == Core::HID::NpadStyleIndex::None) {
|
||||
controller.styleset_changed_event->GetWritableEvent().Signal();
|
||||
return;
|
||||
}
|
||||
|
||||
// Reset memory values
|
||||
shared_memory->style_tag.raw = Core::HID::NpadStyleSet::None;
|
||||
shared_memory->device_type.raw = 0;
|
||||
shared_memory->system_properties.raw = 0;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::NoController;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::NoController;
|
||||
shared_memory->fullkey_color = {};
|
||||
shared_memory->joycon_color.left = {};
|
||||
shared_memory->joycon_color.right = {};
|
||||
shared_memory->battery_level_dual = {};
|
||||
shared_memory->battery_level_left = {};
|
||||
shared_memory->battery_level_right = {};
|
||||
|
||||
switch (controller_type) {
|
||||
case Core::HID::NpadStyleIndex::None:
|
||||
ASSERT(false);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.fullkey;
|
||||
shared_memory->battery_level_dual = battery_level.dual.battery_level;
|
||||
shared_memory->style_tag.fullkey.Assign(1);
|
||||
shared_memory->device_type.fullkey.Assign(1);
|
||||
shared_memory->system_properties.is_vertical.Assign(1);
|
||||
shared_memory->system_properties.use_plus.Assign(1);
|
||||
shared_memory->system_properties.use_minus.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_dual.Assign(
|
||||
battery_level.dual.is_charging);
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::SwitchProController;
|
||||
shared_memory->sixaxis_fullkey_properties.is_newly_assigned.Assign(1);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.fullkey;
|
||||
shared_memory->joycon_color.left = body_colors.left;
|
||||
shared_memory->joycon_color.right = body_colors.right;
|
||||
shared_memory->style_tag.handheld.Assign(1);
|
||||
shared_memory->device_type.handheld_left.Assign(1);
|
||||
shared_memory->device_type.handheld_right.Assign(1);
|
||||
@@ -215,86 +192,47 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
shared_memory->system_properties.use_plus.Assign(1);
|
||||
shared_memory->system_properties.use_minus.Assign(1);
|
||||
shared_memory->system_properties.use_directional_buttons.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_dual.Assign(
|
||||
battery_level.left.is_charging);
|
||||
shared_memory->system_properties.is_charging_joy_left.Assign(
|
||||
battery_level.left.is_charging);
|
||||
shared_memory->system_properties.is_charging_joy_right.Assign(
|
||||
battery_level.right.is_charging);
|
||||
shared_memory->assignment_mode = NpadJoyAssignmentMode::Dual;
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type =
|
||||
AppletFooterUiType::HandheldJoyConLeftJoyConRight;
|
||||
shared_memory->sixaxis_handheld_properties.is_newly_assigned.Assign(1);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->style_tag.joycon_dual.Assign(1);
|
||||
if (controller.is_dual_left_connected) {
|
||||
shared_memory->joycon_color.left = body_colors.left;
|
||||
shared_memory->battery_level_left = battery_level.left.battery_level;
|
||||
shared_memory->device_type.joycon_left.Assign(1);
|
||||
shared_memory->system_properties.use_minus.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_left.Assign(
|
||||
battery_level.left.is_charging);
|
||||
shared_memory->sixaxis_dual_left_properties.is_newly_assigned.Assign(1);
|
||||
}
|
||||
if (controller.is_dual_right_connected) {
|
||||
shared_memory->joycon_color.right = body_colors.right;
|
||||
shared_memory->battery_level_right = battery_level.right.battery_level;
|
||||
shared_memory->device_type.joycon_right.Assign(1);
|
||||
shared_memory->system_properties.use_plus.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_right.Assign(
|
||||
battery_level.right.is_charging);
|
||||
shared_memory->sixaxis_dual_right_properties.is_newly_assigned.Assign(1);
|
||||
}
|
||||
shared_memory->system_properties.use_directional_buttons.Assign(1);
|
||||
shared_memory->system_properties.is_vertical.Assign(1);
|
||||
shared_memory->assignment_mode = NpadJoyAssignmentMode::Dual;
|
||||
|
||||
if (controller.is_dual_left_connected && controller.is_dual_right_connected) {
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::JoyDual;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.left;
|
||||
shared_memory->battery_level_dual = battery_level.left.battery_level;
|
||||
shared_memory->system_properties.is_charging_joy_dual.Assign(
|
||||
battery_level.left.is_charging);
|
||||
} else if (controller.is_dual_left_connected) {
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::JoyDualLeftOnly;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.left;
|
||||
shared_memory->battery_level_dual = battery_level.left.battery_level;
|
||||
shared_memory->system_properties.is_charging_joy_dual.Assign(
|
||||
battery_level.left.is_charging);
|
||||
} else {
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::JoyDualRightOnly;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.right;
|
||||
shared_memory->battery_level_dual = battery_level.right.battery_level;
|
||||
shared_memory->system_properties.is_charging_joy_dual.Assign(
|
||||
battery_level.right.is_charging);
|
||||
}
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.left = body_colors.left;
|
||||
shared_memory->battery_level_dual = battery_level.left.battery_level;
|
||||
shared_memory->style_tag.joycon_left.Assign(1);
|
||||
shared_memory->device_type.joycon_left.Assign(1);
|
||||
shared_memory->system_properties.is_horizontal.Assign(1);
|
||||
shared_memory->system_properties.use_minus.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_left.Assign(
|
||||
battery_level.left.is_charging);
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::JoyLeftHorizontal;
|
||||
shared_memory->sixaxis_left_properties.is_newly_assigned.Assign(1);
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconRight:
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.right = body_colors.right;
|
||||
shared_memory->battery_level_right = battery_level.right.battery_level;
|
||||
shared_memory->style_tag.joycon_right.Assign(1);
|
||||
shared_memory->device_type.joycon_right.Assign(1);
|
||||
shared_memory->system_properties.is_horizontal.Assign(1);
|
||||
shared_memory->system_properties.use_plus.Assign(1);
|
||||
shared_memory->system_properties.is_charging_joy_right.Assign(
|
||||
battery_level.right.is_charging);
|
||||
shared_memory->applet_nfc_xcd.applet_footer.type = AppletFooterUiType::JoyRightHorizontal;
|
||||
shared_memory->sixaxis_right_properties.is_newly_assigned.Assign(1);
|
||||
break;
|
||||
@@ -331,6 +269,21 @@ void Controller_NPad::InitNewlyAddedController(Core::HID::NpadIdType npad_id) {
|
||||
break;
|
||||
}
|
||||
|
||||
const auto& body_colors = controller.device->GetColors();
|
||||
|
||||
shared_memory->fullkey_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->fullkey_color.fullkey = body_colors.fullkey;
|
||||
|
||||
shared_memory->joycon_color.attribute = ColorAttribute::Ok;
|
||||
shared_memory->joycon_color.left = body_colors.left;
|
||||
shared_memory->joycon_color.right = body_colors.right;
|
||||
|
||||
// TODO: Investigate when we should report all batery types
|
||||
const auto& battery_level = controller.device->GetBattery();
|
||||
shared_memory->battery_level_dual = battery_level.dual.battery_level;
|
||||
shared_memory->battery_level_left = battery_level.left.battery_level;
|
||||
shared_memory->battery_level_right = battery_level.right.battery_level;
|
||||
|
||||
controller.is_connected = true;
|
||||
controller.device->Connect();
|
||||
SignalStyleSetChangedEvent(npad_id);
|
||||
|
||||
12
src/core/hle/service/ldn/errors.h
Normal file
@@ -0,0 +1,12 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/result.h"
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
constexpr Result ERROR_DISABLED{ErrorModule::LDN, 22};
|
||||
|
||||
} // namespace Service::LDN
|
||||
@@ -3,15 +3,11 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/ldn/errors.h"
|
||||
#include "core/hle/service/ldn/ldn.h"
|
||||
#include "core/hle/service/ldn/ldn_results.h"
|
||||
#include "core/hle/service/ldn/ldn_types.h"
|
||||
#include "core/internal_network/network.h"
|
||||
#include "core/internal_network/network_interface.h"
|
||||
|
||||
// This is defined by synchapi.h and conflicts with ServiceContext::CreateEvent
|
||||
#undef CreateEvent
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
@@ -104,418 +100,74 @@ class IUserLocalCommunicationService final
|
||||
: public ServiceFramework<IUserLocalCommunicationService> {
|
||||
public:
|
||||
explicit IUserLocalCommunicationService(Core::System& system_)
|
||||
: ServiceFramework{system_, "IUserLocalCommunicationService", ServiceThreadType::CreateNew},
|
||||
service_context{system, "IUserLocalCommunicationService"}, room_network{
|
||||
system_.GetRoomNetwork()} {
|
||||
: ServiceFramework{system_, "IUserLocalCommunicationService"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &IUserLocalCommunicationService::GetState, "GetState"},
|
||||
{1, &IUserLocalCommunicationService::GetNetworkInfo, "GetNetworkInfo"},
|
||||
{1, nullptr, "GetNetworkInfo"},
|
||||
{2, nullptr, "GetIpv4Address"},
|
||||
{3, &IUserLocalCommunicationService::GetDisconnectReason, "GetDisconnectReason"},
|
||||
{4, &IUserLocalCommunicationService::GetSecurityParameter, "GetSecurityParameter"},
|
||||
{5, &IUserLocalCommunicationService::GetNetworkConfig, "GetNetworkConfig"},
|
||||
{100, &IUserLocalCommunicationService::AttachStateChangeEvent, "AttachStateChangeEvent"},
|
||||
{101, &IUserLocalCommunicationService::GetNetworkInfoLatestUpdate, "GetNetworkInfoLatestUpdate"},
|
||||
{102, &IUserLocalCommunicationService::Scan, "Scan"},
|
||||
{103, &IUserLocalCommunicationService::ScanPrivate, "ScanPrivate"},
|
||||
{3, nullptr, "GetDisconnectReason"},
|
||||
{4, nullptr, "GetSecurityParameter"},
|
||||
{5, nullptr, "GetNetworkConfig"},
|
||||
{100, nullptr, "AttachStateChangeEvent"},
|
||||
{101, nullptr, "GetNetworkInfoLatestUpdate"},
|
||||
{102, nullptr, "Scan"},
|
||||
{103, nullptr, "ScanPrivate"},
|
||||
{104, nullptr, "SetWirelessControllerRestriction"},
|
||||
{200, &IUserLocalCommunicationService::OpenAccessPoint, "OpenAccessPoint"},
|
||||
{201, &IUserLocalCommunicationService::CloseAccessPoint, "CloseAccessPoint"},
|
||||
{202, &IUserLocalCommunicationService::CreateNetwork, "CreateNetwork"},
|
||||
{203, &IUserLocalCommunicationService::CreateNetworkPrivate, "CreateNetworkPrivate"},
|
||||
{204, &IUserLocalCommunicationService::DestroyNetwork, "DestroyNetwork"},
|
||||
{200, nullptr, "OpenAccessPoint"},
|
||||
{201, nullptr, "CloseAccessPoint"},
|
||||
{202, nullptr, "CreateNetwork"},
|
||||
{203, nullptr, "CreateNetworkPrivate"},
|
||||
{204, nullptr, "DestroyNetwork"},
|
||||
{205, nullptr, "Reject"},
|
||||
{206, &IUserLocalCommunicationService::SetAdvertiseData, "SetAdvertiseData"},
|
||||
{207, &IUserLocalCommunicationService::SetStationAcceptPolicy, "SetStationAcceptPolicy"},
|
||||
{208, &IUserLocalCommunicationService::AddAcceptFilterEntry, "AddAcceptFilterEntry"},
|
||||
{206, nullptr, "SetAdvertiseData"},
|
||||
{207, nullptr, "SetStationAcceptPolicy"},
|
||||
{208, nullptr, "AddAcceptFilterEntry"},
|
||||
{209, nullptr, "ClearAcceptFilter"},
|
||||
{300, &IUserLocalCommunicationService::OpenStation, "OpenStation"},
|
||||
{301, &IUserLocalCommunicationService::CloseStation, "CloseStation"},
|
||||
{302, &IUserLocalCommunicationService::Connect, "Connect"},
|
||||
{300, nullptr, "OpenStation"},
|
||||
{301, nullptr, "CloseStation"},
|
||||
{302, nullptr, "Connect"},
|
||||
{303, nullptr, "ConnectPrivate"},
|
||||
{304, &IUserLocalCommunicationService::Disconnect, "Disconnect"},
|
||||
{400, &IUserLocalCommunicationService::Initialize, "Initialize"},
|
||||
{401, &IUserLocalCommunicationService::Finalize, "Finalize"},
|
||||
{402, &IUserLocalCommunicationService::Initialize2, "Initialize2"},
|
||||
{304, nullptr, "Disconnect"},
|
||||
{400, nullptr, "Initialize"},
|
||||
{401, nullptr, "Finalize"},
|
||||
{402, &IUserLocalCommunicationService::Initialize2, "Initialize2"}, // 7.0.0+
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
|
||||
state_change_event =
|
||||
service_context.CreateEvent("IUserLocalCommunicationService:StateChangeEvent");
|
||||
}
|
||||
|
||||
~IUserLocalCommunicationService() {
|
||||
service_context.CloseEvent(state_change_event);
|
||||
}
|
||||
|
||||
void OnEventFired() {
|
||||
state_change_event->GetWritableEvent().Signal();
|
||||
}
|
||||
|
||||
void GetState(Kernel::HLERequestContext& ctx) {
|
||||
State state = State::Error;
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called, state = {}", state);
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushEnum(state);
|
||||
}
|
||||
|
||||
void GetNetworkInfo(Kernel::HLERequestContext& ctx) {
|
||||
const auto write_buffer_size = ctx.GetWriteBufferSize();
|
||||
// Indicate a network error, as we do not actually emulate LDN
|
||||
rb.Push(static_cast<u32>(State::Error));
|
||||
|
||||
if (write_buffer_size != sizeof(NetworkInfo)) {
|
||||
LOG_ERROR(Service_LDN, "Invalid buffer size {}", write_buffer_size);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultBadInput);
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkInfo network_info{};
|
||||
const auto rc = ResultSuccess;
|
||||
if (rc.IsError()) {
|
||||
LOG_ERROR(Service_LDN, "NetworkInfo is not valid {}", rc.raw);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called, ssid='{}', nodes={}",
|
||||
network_info.common.ssid.GetStringValue(), network_info.ldn.node_count);
|
||||
|
||||
ctx.WriteBuffer<NetworkInfo>(network_info);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
}
|
||||
|
||||
void GetDisconnectReason(Kernel::HLERequestContext& ctx) {
|
||||
const auto disconnect_reason = DisconnectReason::None;
|
||||
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called, disconnect_reason={}", disconnect_reason);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushEnum(disconnect_reason);
|
||||
}
|
||||
|
||||
void GetSecurityParameter(Kernel::HLERequestContext& ctx) {
|
||||
SecurityParameter security_parameter{};
|
||||
NetworkInfo info{};
|
||||
const Result rc = ResultSuccess;
|
||||
|
||||
if (rc.IsError()) {
|
||||
LOG_ERROR(Service_LDN, "NetworkInfo is not valid {}", rc.raw);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
security_parameter.session_id = info.network_id.session_id;
|
||||
std::memcpy(security_parameter.data.data(), info.ldn.security_parameter.data(),
|
||||
sizeof(SecurityParameter::data));
|
||||
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 10};
|
||||
rb.Push(rc);
|
||||
rb.PushRaw<SecurityParameter>(security_parameter);
|
||||
}
|
||||
|
||||
void GetNetworkConfig(Kernel::HLERequestContext& ctx) {
|
||||
NetworkConfig config{};
|
||||
NetworkInfo info{};
|
||||
const Result rc = ResultSuccess;
|
||||
|
||||
if (rc.IsError()) {
|
||||
LOG_ERROR(Service_LDN, "NetworkConfig is not valid {}", rc.raw);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
config.intent_id = info.network_id.intent_id;
|
||||
config.channel = info.common.channel;
|
||||
config.node_count_max = info.ldn.node_count_max;
|
||||
config.local_communication_version = info.ldn.nodes[0].local_communication_version;
|
||||
|
||||
LOG_WARNING(Service_LDN,
|
||||
"(STUBBED) called, intent_id={}/{}, channel={}, node_count_max={}, "
|
||||
"local_communication_version={}",
|
||||
config.intent_id.local_communication_id, config.intent_id.scene_id,
|
||||
config.channel, config.node_count_max, config.local_communication_version);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 10};
|
||||
rb.Push(rc);
|
||||
rb.PushRaw<NetworkConfig>(config);
|
||||
}
|
||||
|
||||
void AttachStateChangeEvent(Kernel::HLERequestContext& ctx) {
|
||||
LOG_INFO(Service_LDN, "called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushCopyObjects(state_change_event->GetReadableEvent());
|
||||
}
|
||||
|
||||
void GetNetworkInfoLatestUpdate(Kernel::HLERequestContext& ctx) {
|
||||
const std::size_t network_buffer_size = ctx.GetWriteBufferSize(0);
|
||||
const std::size_t node_buffer_count = ctx.GetWriteBufferSize(1) / sizeof(NodeLatestUpdate);
|
||||
|
||||
if (node_buffer_count == 0 || network_buffer_size != sizeof(NetworkInfo)) {
|
||||
LOG_ERROR(Service_LDN, "Invalid buffer size {}, {}", network_buffer_size,
|
||||
node_buffer_count);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultBadInput);
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkInfo info;
|
||||
std::vector<NodeLatestUpdate> latest_update(node_buffer_count);
|
||||
|
||||
const auto rc = ResultSuccess;
|
||||
if (rc.IsError()) {
|
||||
LOG_ERROR(Service_LDN, "NetworkInfo is not valid {}", rc.raw);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called, ssid='{}', nodes={}",
|
||||
info.common.ssid.GetStringValue(), info.ldn.node_count);
|
||||
|
||||
ctx.WriteBuffer(info, 0);
|
||||
ctx.WriteBuffer(latest_update, 1);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void Scan(Kernel::HLERequestContext& ctx) {
|
||||
ScanImpl(ctx);
|
||||
}
|
||||
|
||||
void ScanPrivate(Kernel::HLERequestContext& ctx) {
|
||||
ScanImpl(ctx, true);
|
||||
}
|
||||
|
||||
void ScanImpl(Kernel::HLERequestContext& ctx, bool is_private = false) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
const auto channel{rp.PopEnum<WifiChannel>()};
|
||||
const auto scan_filter{rp.PopRaw<ScanFilter>()};
|
||||
|
||||
const std::size_t network_info_size = ctx.GetWriteBufferSize() / sizeof(NetworkInfo);
|
||||
|
||||
if (network_info_size == 0) {
|
||||
LOG_ERROR(Service_LDN, "Invalid buffer size {}", network_info_size);
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultBadInput);
|
||||
return;
|
||||
}
|
||||
|
||||
u16 count = 0;
|
||||
std::vector<NetworkInfo> network_infos(network_info_size);
|
||||
|
||||
LOG_WARNING(Service_LDN,
|
||||
"(STUBBED) called, channel={}, filter_scan_flag={}, filter_network_type={}",
|
||||
channel, scan_filter.flag, scan_filter.network_type);
|
||||
|
||||
ctx.WriteBuffer(network_infos);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u32>(count);
|
||||
}
|
||||
|
||||
void OpenAccessPoint(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void CloseAccessPoint(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void CreateNetwork(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
struct Parameters {
|
||||
SecurityConfig security_config;
|
||||
UserConfig user_config;
|
||||
INSERT_PADDING_WORDS_NOINIT(1);
|
||||
NetworkConfig network_config;
|
||||
};
|
||||
static_assert(sizeof(Parameters) == 0x98, "Parameters has incorrect size.");
|
||||
|
||||
const auto parameters{rp.PopRaw<Parameters>()};
|
||||
|
||||
LOG_WARNING(Service_LDN,
|
||||
"(STUBBED) called, passphrase_size={}, security_mode={}, "
|
||||
"local_communication_version={}",
|
||||
parameters.security_config.passphrase_size,
|
||||
parameters.security_config.security_mode,
|
||||
parameters.network_config.local_communication_version);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void CreateNetworkPrivate(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
struct Parameters {
|
||||
SecurityConfig security_config;
|
||||
SecurityParameter security_parameter;
|
||||
UserConfig user_config;
|
||||
NetworkConfig network_config;
|
||||
};
|
||||
static_assert(sizeof(Parameters) == 0xB8, "Parameters has incorrect size.");
|
||||
|
||||
const auto parameters{rp.PopRaw<Parameters>()};
|
||||
|
||||
LOG_WARNING(Service_LDN,
|
||||
"(STUBBED) called, passphrase_size={}, security_mode={}, "
|
||||
"local_communication_version={}",
|
||||
parameters.security_config.passphrase_size,
|
||||
parameters.security_config.security_mode,
|
||||
parameters.network_config.local_communication_version);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void DestroyNetwork(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void SetAdvertiseData(Kernel::HLERequestContext& ctx) {
|
||||
std::vector<u8> read_buffer = ctx.ReadBuffer();
|
||||
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called, size {}", read_buffer.size());
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void SetStationAcceptPolicy(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void AddAcceptFilterEntry(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void OpenStation(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void CloseStation(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void Connect(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
struct Parameters {
|
||||
SecurityConfig security_config;
|
||||
UserConfig user_config;
|
||||
u32 local_communication_version;
|
||||
u32 option;
|
||||
};
|
||||
static_assert(sizeof(Parameters) == 0x7C, "Parameters has incorrect size.");
|
||||
|
||||
const auto parameters{rp.PopRaw<Parameters>()};
|
||||
|
||||
LOG_WARNING(Service_LDN,
|
||||
"(STUBBED) called, passphrase_size={}, security_mode={}, "
|
||||
"local_communication_version={}",
|
||||
parameters.security_config.passphrase_size,
|
||||
parameters.security_config.security_mode,
|
||||
parameters.local_communication_version);
|
||||
|
||||
const std::vector<u8> read_buffer = ctx.ReadBuffer();
|
||||
NetworkInfo network_info{};
|
||||
|
||||
if (read_buffer.size() != sizeof(NetworkInfo)) {
|
||||
LOG_ERROR(Frontend, "NetworkInfo doesn't match read_buffer size!");
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultBadInput);
|
||||
return;
|
||||
}
|
||||
|
||||
std::memcpy(&network_info, read_buffer.data(), read_buffer.size());
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void Disconnect(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
void Initialize(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
const auto rc = InitializeImpl(ctx);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
}
|
||||
|
||||
void Finalize(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
is_initialized = false;
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void Initialize2(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
const auto rc = InitializeImpl(ctx);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(rc);
|
||||
}
|
||||
|
||||
Result InitializeImpl(Kernel::HLERequestContext& ctx) {
|
||||
const auto network_interface = Network::GetSelectedNetworkInterface();
|
||||
if (!network_interface) {
|
||||
LOG_ERROR(Service_LDN, "No network interface is set");
|
||||
return ResultAirplaneModeEnabled;
|
||||
}
|
||||
LOG_DEBUG(Service_LDN, "called");
|
||||
|
||||
is_initialized = true;
|
||||
// TODO (flTobi): Change this to ResultSuccess when LDN is fully implemented
|
||||
return ResultAirplaneModeEnabled;
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ERROR_DISABLED);
|
||||
}
|
||||
|
||||
KernelHelpers::ServiceContext service_context;
|
||||
Kernel::KEvent* state_change_event;
|
||||
Network::RoomNetwork& room_network;
|
||||
private:
|
||||
enum class State {
|
||||
None,
|
||||
Initialized,
|
||||
AccessPointOpened,
|
||||
AccessPointCreated,
|
||||
StationOpened,
|
||||
StationConnected,
|
||||
Error,
|
||||
};
|
||||
|
||||
bool is_initialized{};
|
||||
};
|
||||
@@ -621,7 +273,7 @@ public:
|
||||
LOG_WARNING(Service_LDN, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultDisabled);
|
||||
rb.Push(ERROR_DISABLED);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,12 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/kernel_helpers.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/result.h"
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
constexpr Result ResultAdvertiseDataTooLarge{ErrorModule::LDN, 10};
|
||||
constexpr Result ResultAuthenticationFailed{ErrorModule::LDN, 20};
|
||||
constexpr Result ResultDisabled{ErrorModule::LDN, 22};
|
||||
constexpr Result ResultAirplaneModeEnabled{ErrorModule::LDN, 23};
|
||||
constexpr Result ResultInvalidNodeCount{ErrorModule::LDN, 30};
|
||||
constexpr Result ResultConnectionFailed{ErrorModule::LDN, 31};
|
||||
constexpr Result ResultBadState{ErrorModule::LDN, 32};
|
||||
constexpr Result ResultNoIpAddress{ErrorModule::LDN, 33};
|
||||
constexpr Result ResultInvalidBufferCount{ErrorModule::LDN, 50};
|
||||
constexpr Result ResultAccessPointConnectionFailed{ErrorModule::LDN, 65};
|
||||
constexpr Result ResultAuthenticationTimeout{ErrorModule::LDN, 66};
|
||||
constexpr Result ResultMaximumNodeCount{ErrorModule::LDN, 67};
|
||||
constexpr Result ResultBadInput{ErrorModule::LDN, 96};
|
||||
constexpr Result ResultLocalCommunicationIdNotFound{ErrorModule::LDN, 97};
|
||||
constexpr Result ResultLocalCommunicationVersionTooLow{ErrorModule::LDN, 113};
|
||||
constexpr Result ResultLocalCommunicationVersionTooHigh{ErrorModule::LDN, 114};
|
||||
|
||||
} // namespace Service::LDN
|
||||
@@ -1,284 +0,0 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "network/network.h"
|
||||
|
||||
namespace Service::LDN {
|
||||
|
||||
constexpr size_t SsidLengthMax = 32;
|
||||
constexpr size_t AdvertiseDataSizeMax = 384;
|
||||
constexpr size_t UserNameBytesMax = 32;
|
||||
constexpr int NodeCountMax = 8;
|
||||
constexpr int StationCountMax = NodeCountMax - 1;
|
||||
constexpr size_t PassphraseLengthMax = 64;
|
||||
|
||||
enum class SecurityMode : u16 {
|
||||
All,
|
||||
Retail,
|
||||
Debug,
|
||||
};
|
||||
|
||||
enum class NodeStateChange : u8 {
|
||||
None,
|
||||
Connect,
|
||||
Disconnect,
|
||||
DisconnectAndConnect,
|
||||
};
|
||||
|
||||
enum class ScanFilterFlag : u32 {
|
||||
None = 0,
|
||||
LocalCommunicationId = 1 << 0,
|
||||
SessionId = 1 << 1,
|
||||
NetworkType = 1 << 2,
|
||||
Ssid = 1 << 4,
|
||||
SceneId = 1 << 5,
|
||||
IntentId = LocalCommunicationId | SceneId,
|
||||
NetworkId = IntentId | SessionId,
|
||||
};
|
||||
|
||||
enum class NetworkType : u32 {
|
||||
None,
|
||||
General,
|
||||
Ldn,
|
||||
All,
|
||||
};
|
||||
|
||||
enum class PackedNetworkType : u8 {
|
||||
None,
|
||||
General,
|
||||
Ldn,
|
||||
All,
|
||||
};
|
||||
|
||||
enum class State : u32 {
|
||||
None,
|
||||
Initialized,
|
||||
AccessPointOpened,
|
||||
AccessPointCreated,
|
||||
StationOpened,
|
||||
StationConnected,
|
||||
Error,
|
||||
};
|
||||
|
||||
enum class DisconnectReason : s16 {
|
||||
Unknown = -1,
|
||||
None,
|
||||
DisconnectedByUser,
|
||||
DisconnectedBySystem,
|
||||
DestroyedByUser,
|
||||
DestroyedBySystem,
|
||||
Rejected,
|
||||
SignalLost,
|
||||
};
|
||||
|
||||
enum class NetworkError {
|
||||
Unknown = -1,
|
||||
None = 0,
|
||||
PortUnreachable,
|
||||
TooManyPlayers,
|
||||
VersionTooLow,
|
||||
VersionTooHigh,
|
||||
ConnectFailure,
|
||||
ConnectNotFound,
|
||||
ConnectTimeout,
|
||||
ConnectRejected,
|
||||
RejectFailed,
|
||||
};
|
||||
|
||||
enum class AcceptPolicy : u8 {
|
||||
AcceptAll,
|
||||
RejectAll,
|
||||
BlackList,
|
||||
WhiteList,
|
||||
};
|
||||
|
||||
enum class WifiChannel : s16 {
|
||||
Default = 0,
|
||||
wifi24_1 = 1,
|
||||
wifi24_6 = 6,
|
||||
wifi24_11 = 11,
|
||||
wifi50_36 = 36,
|
||||
wifi50_40 = 40,
|
||||
wifi50_44 = 44,
|
||||
wifi50_48 = 48,
|
||||
};
|
||||
|
||||
enum class LinkLevel : s8 {
|
||||
Bad,
|
||||
Low,
|
||||
Good,
|
||||
Excelent,
|
||||
};
|
||||
|
||||
struct NodeLatestUpdate {
|
||||
NodeStateChange state_change;
|
||||
INSERT_PADDING_BYTES(0x7); // Unknown
|
||||
};
|
||||
static_assert(sizeof(NodeLatestUpdate) == 0x8, "NodeLatestUpdate is an invalid size");
|
||||
|
||||
struct SessionId {
|
||||
u64 high;
|
||||
u64 low;
|
||||
|
||||
bool operator==(const SessionId&) const = default;
|
||||
};
|
||||
static_assert(sizeof(SessionId) == 0x10, "SessionId is an invalid size");
|
||||
|
||||
struct IntentId {
|
||||
u64 local_communication_id;
|
||||
INSERT_PADDING_BYTES(0x2); // Reserved
|
||||
u16 scene_id;
|
||||
INSERT_PADDING_BYTES(0x4); // Reserved
|
||||
};
|
||||
static_assert(sizeof(IntentId) == 0x10, "IntentId is an invalid size");
|
||||
|
||||
struct NetworkId {
|
||||
IntentId intent_id;
|
||||
SessionId session_id;
|
||||
};
|
||||
static_assert(sizeof(NetworkId) == 0x20, "NetworkId is an invalid size");
|
||||
|
||||
struct Ssid {
|
||||
u8 length;
|
||||
std::array<char, SsidLengthMax + 1> raw;
|
||||
|
||||
std::string GetStringValue() const {
|
||||
return std::string(raw.data(), length);
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size");
|
||||
|
||||
struct Ipv4Address {
|
||||
union {
|
||||
u32 raw{};
|
||||
std::array<u8, 4> bytes;
|
||||
};
|
||||
|
||||
std::string GetStringValue() const {
|
||||
return fmt::format("{}.{}.{}.{}", bytes[3], bytes[2], bytes[1], bytes[0]);
|
||||
}
|
||||
};
|
||||
static_assert(sizeof(Ipv4Address) == 0x4, "Ipv4Address is an invalid size");
|
||||
|
||||
struct MacAddress {
|
||||
std::array<u8, 6> raw{};
|
||||
|
||||
friend bool operator==(const MacAddress& lhs, const MacAddress& rhs) = default;
|
||||
};
|
||||
static_assert(sizeof(MacAddress) == 0x6, "MacAddress is an invalid size");
|
||||
|
||||
struct ScanFilter {
|
||||
NetworkId network_id;
|
||||
NetworkType network_type;
|
||||
MacAddress mac_address;
|
||||
Ssid ssid;
|
||||
INSERT_PADDING_BYTES(0x10);
|
||||
ScanFilterFlag flag;
|
||||
};
|
||||
static_assert(sizeof(ScanFilter) == 0x60, "ScanFilter is an invalid size");
|
||||
|
||||
struct CommonNetworkInfo {
|
||||
MacAddress bssid;
|
||||
Ssid ssid;
|
||||
WifiChannel channel;
|
||||
LinkLevel link_level;
|
||||
PackedNetworkType network_type;
|
||||
INSERT_PADDING_BYTES(0x4);
|
||||
};
|
||||
static_assert(sizeof(CommonNetworkInfo) == 0x30, "CommonNetworkInfo is an invalid size");
|
||||
|
||||
struct NodeInfo {
|
||||
Ipv4Address ipv4_address;
|
||||
MacAddress mac_address;
|
||||
s8 node_id;
|
||||
u8 is_connected;
|
||||
std::array<u8, UserNameBytesMax + 1> user_name;
|
||||
INSERT_PADDING_BYTES(0x1); // Reserved
|
||||
s16 local_communication_version;
|
||||
INSERT_PADDING_BYTES(0x10); // Reserved
|
||||
};
|
||||
static_assert(sizeof(NodeInfo) == 0x40, "NodeInfo is an invalid size");
|
||||
|
||||
struct LdnNetworkInfo {
|
||||
std::array<u8, 0x10> security_parameter;
|
||||
SecurityMode security_mode;
|
||||
AcceptPolicy station_accept_policy;
|
||||
u8 has_action_frame;
|
||||
INSERT_PADDING_BYTES(0x2); // Padding
|
||||
u8 node_count_max;
|
||||
u8 node_count;
|
||||
std::array<NodeInfo, NodeCountMax> nodes;
|
||||
INSERT_PADDING_BYTES(0x2); // Reserved
|
||||
u16 advertise_data_size;
|
||||
std::array<u8, AdvertiseDataSizeMax> advertise_data;
|
||||
INSERT_PADDING_BYTES(0x8C); // Reserved
|
||||
u64 random_authentication_id;
|
||||
};
|
||||
static_assert(sizeof(LdnNetworkInfo) == 0x430, "LdnNetworkInfo is an invalid size");
|
||||
|
||||
struct NetworkInfo {
|
||||
NetworkId network_id;
|
||||
CommonNetworkInfo common;
|
||||
LdnNetworkInfo ldn;
|
||||
};
|
||||
static_assert(sizeof(NetworkInfo) == 0x480, "NetworkInfo is an invalid size");
|
||||
|
||||
struct SecurityConfig {
|
||||
SecurityMode security_mode;
|
||||
u16 passphrase_size;
|
||||
std::array<u8, PassphraseLengthMax> passphrase;
|
||||
};
|
||||
static_assert(sizeof(SecurityConfig) == 0x44, "SecurityConfig is an invalid size");
|
||||
|
||||
struct UserConfig {
|
||||
std::array<u8, UserNameBytesMax + 1> user_name;
|
||||
INSERT_PADDING_BYTES(0xF); // Reserved
|
||||
};
|
||||
static_assert(sizeof(UserConfig) == 0x30, "UserConfig is an invalid size");
|
||||
|
||||
#pragma pack(push, 4)
|
||||
struct ConnectRequest {
|
||||
SecurityConfig security_config;
|
||||
UserConfig user_config;
|
||||
u32 local_communication_version;
|
||||
u32 option_unknown;
|
||||
NetworkInfo network_info;
|
||||
};
|
||||
static_assert(sizeof(ConnectRequest) == 0x4FC, "ConnectRequest is an invalid size");
|
||||
#pragma pack(pop)
|
||||
|
||||
struct SecurityParameter {
|
||||
std::array<u8, 0x10> data; // Data, used with the same key derivation as SecurityConfig
|
||||
SessionId session_id;
|
||||
};
|
||||
static_assert(sizeof(SecurityParameter) == 0x20, "SecurityParameter is an invalid size");
|
||||
|
||||
struct NetworkConfig {
|
||||
IntentId intent_id;
|
||||
WifiChannel channel;
|
||||
u8 node_count_max;
|
||||
INSERT_PADDING_BYTES(0x1); // Reserved
|
||||
u16 local_communication_version;
|
||||
INSERT_PADDING_BYTES(0xA); // Reserved
|
||||
};
|
||||
static_assert(sizeof(NetworkConfig) == 0x20, "NetworkConfig is an invalid size");
|
||||
|
||||
struct AddressEntry {
|
||||
Ipv4Address ipv4_address;
|
||||
MacAddress mac_address;
|
||||
INSERT_PADDING_BYTES(0x2); // Reserved
|
||||
};
|
||||
static_assert(sizeof(AddressEntry) == 0xC, "AddressEntry is an invalid size");
|
||||
|
||||
struct AddressList {
|
||||
std::array<AddressEntry, 0x8> addresses;
|
||||
};
|
||||
static_assert(sizeof(AddressList) == 0x60, "AddressList is an invalid size");
|
||||
|
||||
} // namespace Service::LDN
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "core/hle/kernel/k_event.h"
|
||||
#include "core/hle/service/kernel_helpers.h"
|
||||
#include "core/hle/service/nifm/nifm.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -270,45 +271,142 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
void IGeneralService::GetClientId(Kernel::HLERequestContext& ctx) {
|
||||
static constexpr u32 client_id = 1;
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
class IGeneralService final : public ServiceFramework<IGeneralService> {
|
||||
public:
|
||||
explicit IGeneralService(Core::System& system_);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
||||
}
|
||||
private:
|
||||
void GetClientId(Kernel::HLERequestContext& ctx) {
|
||||
static constexpr u32 client_id = 1;
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
void IGeneralService::CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u64>(client_id); // Client ID needs to be non zero otherwise it's considered invalid
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
void CreateScanRequest(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IScanRequest>(system);
|
||||
}
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
|
||||
void IGeneralService::CreateRequest(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IScanRequest>(system);
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
void CreateRequest(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IRequest>(system);
|
||||
}
|
||||
IPC::ResponseBuilder rb{ctx, 2, 0, 1};
|
||||
|
||||
void IGeneralService::GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<IRequest>(system);
|
||||
}
|
||||
|
||||
const auto net_iface = Network::GetSelectedNetworkInterface();
|
||||
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
SfNetworkProfileData network_profile_data = [&net_iface] {
|
||||
if (!net_iface) {
|
||||
return SfNetworkProfileData{};
|
||||
const auto net_iface = Network::GetSelectedNetworkInterface();
|
||||
|
||||
const SfNetworkProfileData network_profile_data = [&net_iface] {
|
||||
if (!net_iface) {
|
||||
return SfNetworkProfileData{};
|
||||
}
|
||||
|
||||
return SfNetworkProfileData{
|
||||
.ip_setting_data{
|
||||
.ip_address_setting{
|
||||
.is_automatic{true},
|
||||
.current_address{Network::TranslateIPv4(net_iface->ip_address)},
|
||||
.subnet_mask{Network::TranslateIPv4(net_iface->subnet_mask)},
|
||||
.gateway{Network::TranslateIPv4(net_iface->gateway)},
|
||||
},
|
||||
.dns_setting{
|
||||
.is_automatic{true},
|
||||
.primary_dns{1, 1, 1, 1},
|
||||
.secondary_dns{1, 0, 0, 1},
|
||||
},
|
||||
.proxy_setting{
|
||||
.enabled{false},
|
||||
.port{},
|
||||
.proxy_server{},
|
||||
.automatic_auth_enabled{},
|
||||
.user{},
|
||||
.password{},
|
||||
},
|
||||
.mtu{1500},
|
||||
},
|
||||
.uuid{0xdeadbeef, 0xdeadbeef},
|
||||
.network_name{"yuzu Network"},
|
||||
.wireless_setting_data{
|
||||
.ssid_length{12},
|
||||
.ssid{"yuzu Network"},
|
||||
.passphrase{"yuzupassword"},
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
ctx.WriteBuffer(network_profile_data);
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
auto ipv4 = Network::GetHostIPv4Address();
|
||||
if (!ipv4) {
|
||||
LOG_ERROR(Service_NIFM, "Couldn't get host IPv4 address, defaulting to 0.0.0.0");
|
||||
ipv4.emplace(Network::IPv4Address{0, 0, 0, 0});
|
||||
}
|
||||
|
||||
return SfNetworkProfileData{
|
||||
.ip_setting_data{
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw(*ipv4);
|
||||
}
|
||||
|
||||
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
|
||||
ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c,
|
||||
"SfNetworkProfileData is not the correct size");
|
||||
u128 uuid{};
|
||||
auto buffer = ctx.ReadBuffer();
|
||||
std::memcpy(&uuid, buffer.data() + 8, sizeof(u128));
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
||||
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<INetworkProfile>(system);
|
||||
rb.PushRaw<u128>(uuid);
|
||||
}
|
||||
|
||||
void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
struct IpConfigInfo {
|
||||
IpAddressSetting ip_address_setting{};
|
||||
DnsSetting dns_setting{};
|
||||
};
|
||||
static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting),
|
||||
"IpConfigInfo has incorrect size.");
|
||||
|
||||
const auto net_iface = Network::GetSelectedNetworkInterface();
|
||||
|
||||
const IpConfigInfo ip_config_info = [&net_iface] {
|
||||
if (!net_iface) {
|
||||
return IpConfigInfo{};
|
||||
}
|
||||
|
||||
return IpConfigInfo{
|
||||
.ip_address_setting{
|
||||
.is_automatic{true},
|
||||
.current_address{Network::TranslateIPv4(net_iface->ip_address)},
|
||||
@@ -320,178 +418,66 @@ void IGeneralService::GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
.primary_dns{1, 1, 1, 1},
|
||||
.secondary_dns{1, 0, 0, 1},
|
||||
},
|
||||
.proxy_setting{
|
||||
.enabled{false},
|
||||
.port{},
|
||||
.proxy_server{},
|
||||
.automatic_auth_enabled{},
|
||||
.user{},
|
||||
.password{},
|
||||
},
|
||||
.mtu{1500},
|
||||
},
|
||||
.uuid{0xdeadbeef, 0xdeadbeef},
|
||||
.network_name{"yuzu Network"},
|
||||
.wireless_setting_data{
|
||||
.ssid_length{12},
|
||||
.ssid{"yuzu Network"},
|
||||
.passphrase{"yuzupassword"},
|
||||
},
|
||||
};
|
||||
}();
|
||||
};
|
||||
}();
|
||||
|
||||
// When we're connected to a room, spoof the hosts IP address
|
||||
if (auto room_member = network.GetRoomMember().lock()) {
|
||||
if (room_member->IsConnected()) {
|
||||
network_profile_data.ip_setting_data.ip_address_setting.current_address =
|
||||
room_member->GetFakeIpAddress();
|
||||
}
|
||||
IPC::ResponseBuilder rb{ctx, 2 + (sizeof(IpConfigInfo) + 3) / sizeof(u32)};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
||||
}
|
||||
|
||||
ctx.WriteBuffer(network_profile_data);
|
||||
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::RemoveNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2};
|
||||
rb.Push(ResultSuccess);
|
||||
}
|
||||
|
||||
void IGeneralService::GetCurrentIpAddress(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
auto ipv4 = Network::GetHostIPv4Address();
|
||||
if (!ipv4) {
|
||||
LOG_ERROR(Service_NIFM, "Couldn't get host IPv4 address, defaulting to 0.0.0.0");
|
||||
ipv4.emplace(Network::IPv4Address{0, 0, 0, 0});
|
||||
}
|
||||
|
||||
// When we're connected to a room, spoof the hosts IP address
|
||||
if (auto room_member = network.GetRoomMember().lock()) {
|
||||
if (room_member->IsConnected()) {
|
||||
ipv4 = room_member->GetFakeIpAddress();
|
||||
}
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw(*ipv4);
|
||||
}
|
||||
|
||||
void IGeneralService::CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
|
||||
LOG_DEBUG(Service_NIFM, "called");
|
||||
|
||||
ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "SfNetworkProfileData is not the correct size");
|
||||
u128 uuid{};
|
||||
auto buffer = ctx.ReadBuffer();
|
||||
std::memcpy(&uuid, buffer.data() + 8, sizeof(u128));
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 6, 0, 1};
|
||||
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushIpcInterface<INetworkProfile>(system);
|
||||
rb.PushRaw<u128>(uuid);
|
||||
}
|
||||
|
||||
void IGeneralService::GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
struct IpConfigInfo {
|
||||
IpAddressSetting ip_address_setting{};
|
||||
DnsSetting dns_setting{};
|
||||
};
|
||||
static_assert(sizeof(IpConfigInfo) == sizeof(IpAddressSetting) + sizeof(DnsSetting),
|
||||
"IpConfigInfo has incorrect size.");
|
||||
|
||||
const auto net_iface = Network::GetSelectedNetworkInterface();
|
||||
|
||||
IpConfigInfo ip_config_info = [&net_iface] {
|
||||
if (!net_iface) {
|
||||
return IpConfigInfo{};
|
||||
}
|
||||
|
||||
return IpConfigInfo{
|
||||
.ip_address_setting{
|
||||
.is_automatic{true},
|
||||
.current_address{Network::TranslateIPv4(net_iface->ip_address)},
|
||||
.subnet_mask{Network::TranslateIPv4(net_iface->subnet_mask)},
|
||||
.gateway{Network::TranslateIPv4(net_iface->gateway)},
|
||||
},
|
||||
.dns_setting{
|
||||
.is_automatic{true},
|
||||
.primary_dns{1, 1, 1, 1},
|
||||
.secondary_dns{1, 0, 0, 1},
|
||||
},
|
||||
};
|
||||
}();
|
||||
|
||||
// When we're connected to a room, spoof the hosts IP address
|
||||
if (auto room_member = network.GetRoomMember().lock()) {
|
||||
if (room_member->IsConnected()) {
|
||||
ip_config_info.ip_address_setting.current_address = room_member->GetFakeIpAddress();
|
||||
}
|
||||
}
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 2 + (sizeof(IpConfigInfo) + 3) / sizeof(u32)};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw<IpConfigInfo>(ip_config_info);
|
||||
}
|
||||
|
||||
void IGeneralService::IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u8>(1);
|
||||
}
|
||||
|
||||
void IGeneralService::GetInternetConnectionStatus(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
struct Output {
|
||||
InternetConnectionType type{InternetConnectionType::WiFi};
|
||||
u8 wifi_strength{3};
|
||||
InternetConnectionStatus state{InternetConnectionStatus::Connected};
|
||||
};
|
||||
static_assert(sizeof(Output) == 0x3, "Output has incorrect size.");
|
||||
|
||||
constexpr Output out{};
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw(out);
|
||||
}
|
||||
|
||||
void IGeneralService::IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
if (Network::GetHostIPv4Address().has_value()) {
|
||||
rb.Push<u8>(1);
|
||||
} else {
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.Push<u8>(0);
|
||||
}
|
||||
}
|
||||
|
||||
void IGeneralService::IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx) {
|
||||
LOG_ERROR(Service_NIFM, "(STUBBED) called");
|
||||
void GetInternetConnectionStatus(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
if (Network::GetHostIPv4Address().has_value()) {
|
||||
rb.Push<u8>(1);
|
||||
} else {
|
||||
rb.Push<u8>(0);
|
||||
struct Output {
|
||||
InternetConnectionType type{InternetConnectionType::WiFi};
|
||||
u8 wifi_strength{3};
|
||||
InternetConnectionStatus state{InternetConnectionStatus::Connected};
|
||||
};
|
||||
static_assert(sizeof(Output) == 0x3, "Output has incorrect size.");
|
||||
|
||||
constexpr Output out{};
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
rb.PushRaw(out);
|
||||
}
|
||||
}
|
||||
|
||||
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
if (Network::GetHostIPv4Address().has_value()) {
|
||||
rb.Push<u8>(1);
|
||||
} else {
|
||||
rb.Push<u8>(0);
|
||||
}
|
||||
}
|
||||
|
||||
void IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx) {
|
||||
LOG_WARNING(Service_NIFM, "(STUBBED) called");
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 3};
|
||||
rb.Push(ResultSuccess);
|
||||
if (Network::GetHostIPv4Address().has_value()) {
|
||||
rb.Push<u8>(1);
|
||||
} else {
|
||||
rb.Push<u8>(0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
IGeneralService::IGeneralService(Core::System& system_)
|
||||
: ServiceFramework{system_, "IGeneralService"}, network{system_.GetRoomNetwork()} {
|
||||
: ServiceFramework{system_, "IGeneralService"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{1, &IGeneralService::GetClientId, "GetClientId"},
|
||||
@@ -542,8 +528,6 @@ IGeneralService::IGeneralService(Core::System& system_)
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
||||
IGeneralService::~IGeneralService() = default;
|
||||
|
||||
class NetworkInterface final : public ServiceFramework<NetworkInterface> {
|
||||
public:
|
||||
explicit NetworkInterface(const char* name, Core::System& system_)
|
||||
|
||||
@@ -3,11 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/service.h"
|
||||
#include "network/network.h"
|
||||
#include "network/room.h"
|
||||
#include "network/room_member.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
@@ -21,26 +16,4 @@ namespace Service::NIFM {
|
||||
/// Registers all NIFM services with the specified service manager.
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system);
|
||||
|
||||
class IGeneralService final : public ServiceFramework<IGeneralService> {
|
||||
public:
|
||||
explicit IGeneralService(Core::System& system_);
|
||||
~IGeneralService() override;
|
||||
|
||||
private:
|
||||
void GetClientId(Kernel::HLERequestContext& ctx);
|
||||
void CreateScanRequest(Kernel::HLERequestContext& ctx);
|
||||
void CreateRequest(Kernel::HLERequestContext& ctx);
|
||||
void GetCurrentNetworkProfile(Kernel::HLERequestContext& ctx);
|
||||
void RemoveNetworkProfile(Kernel::HLERequestContext& ctx);
|
||||
void GetCurrentIpAddress(Kernel::HLERequestContext& ctx);
|
||||
void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx);
|
||||
void GetCurrentIpConfigInfo(Kernel::HLERequestContext& ctx);
|
||||
void IsWirelessCommunicationEnabled(Kernel::HLERequestContext& ctx);
|
||||
void GetInternetConnectionStatus(Kernel::HLERequestContext& ctx);
|
||||
void IsEthernetCommunicationEnabled(Kernel::HLERequestContext& ctx);
|
||||
void IsAnyInternetRequestAccepted(Kernel::HLERequestContext& ctx);
|
||||
|
||||
Network::RoomNetwork& network;
|
||||
};
|
||||
|
||||
} // namespace Service::NIFM
|
||||
|
||||
@@ -9,16 +9,12 @@
|
||||
#include <fmt/format.h>
|
||||
|
||||
#include "common/microprofile.h"
|
||||
#include "common/socket_types.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/kernel/k_thread.h"
|
||||
#include "core/hle/service/sockets/bsd.h"
|
||||
#include "core/hle/service/sockets/sockets_translate.h"
|
||||
#include "core/internal_network/network.h"
|
||||
#include "core/internal_network/socket_proxy.h"
|
||||
#include "core/internal_network/sockets.h"
|
||||
#include "network/network.h"
|
||||
|
||||
namespace Service::Sockets {
|
||||
|
||||
@@ -476,13 +472,7 @@ std::pair<s32, Errno> BSD::SocketImpl(Domain domain, Type type, Protocol protoco
|
||||
|
||||
LOG_INFO(Service, "New socket fd={}", fd);
|
||||
|
||||
auto room_member = room_network.GetRoomMember().lock();
|
||||
if (room_member && room_member->IsConnected()) {
|
||||
descriptor.socket = std::make_unique<Network::ProxySocket>(room_network);
|
||||
} else {
|
||||
descriptor.socket = std::make_unique<Network::Socket>();
|
||||
}
|
||||
|
||||
descriptor.socket = std::make_unique<Network::Socket>();
|
||||
descriptor.socket->Initialize(Translate(domain), Translate(type), Translate(type, protocol));
|
||||
descriptor.is_connection_based = IsConnectionBased(type);
|
||||
|
||||
@@ -658,7 +648,7 @@ std::pair<s32, Errno> BSD::FcntlImpl(s32 fd, FcntlCmd cmd, s32 arg) {
|
||||
ASSERT(arg == 0);
|
||||
return {descriptor.flags, Errno::SUCCESS};
|
||||
case FcntlCmd::SETFL: {
|
||||
const bool enable = (arg & Network::FLAG_O_NONBLOCK) != 0;
|
||||
const bool enable = (arg & FLAG_O_NONBLOCK) != 0;
|
||||
const Errno bsd_errno = Translate(descriptor.socket->SetNonBlock(enable));
|
||||
if (bsd_errno != Errno::SUCCESS) {
|
||||
return {-1, bsd_errno};
|
||||
@@ -679,7 +669,7 @@ Errno BSD::SetSockOptImpl(s32 fd, u32 level, OptName optname, size_t optlen, con
|
||||
return Errno::BADF;
|
||||
}
|
||||
|
||||
Network::SocketBase* const socket = file_descriptors[fd]->socket.get();
|
||||
Network::Socket* const socket = file_descriptors[fd]->socket.get();
|
||||
|
||||
if (optname == OptName::LINGER) {
|
||||
ASSERT(optlen == sizeof(Linger));
|
||||
@@ -734,8 +724,6 @@ std::pair<s32, Errno> BSD::RecvImpl(s32 fd, u32 flags, std::vector<u8>& message)
|
||||
FileDescriptor& descriptor = *file_descriptors[fd];
|
||||
|
||||
// Apply flags
|
||||
using Network::FLAG_MSG_DONTWAIT;
|
||||
using Network::FLAG_O_NONBLOCK;
|
||||
if ((flags & FLAG_MSG_DONTWAIT) != 0) {
|
||||
flags &= ~FLAG_MSG_DONTWAIT;
|
||||
if ((descriptor.flags & FLAG_O_NONBLOCK) == 0) {
|
||||
@@ -771,8 +759,6 @@ std::pair<s32, Errno> BSD::RecvFromImpl(s32 fd, u32 flags, std::vector<u8>& mess
|
||||
}
|
||||
|
||||
// Apply flags
|
||||
using Network::FLAG_MSG_DONTWAIT;
|
||||
using Network::FLAG_O_NONBLOCK;
|
||||
if ((flags & FLAG_MSG_DONTWAIT) != 0) {
|
||||
flags &= ~FLAG_MSG_DONTWAIT;
|
||||
if ((descriptor.flags & FLAG_O_NONBLOCK) == 0) {
|
||||
@@ -871,19 +857,8 @@ void BSD::BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) co
|
||||
rb.PushEnum(bsd_errno);
|
||||
}
|
||||
|
||||
void BSD::OnProxyPacketReceived(const Network::ProxyPacket& packet) {
|
||||
for (auto& optional_descriptor : file_descriptors) {
|
||||
if (!optional_descriptor.has_value()) {
|
||||
continue;
|
||||
}
|
||||
FileDescriptor& descriptor = *optional_descriptor;
|
||||
descriptor.socket.get()->HandleProxyPacket(packet);
|
||||
}
|
||||
}
|
||||
|
||||
BSD::BSD(Core::System& system_, const char* name)
|
||||
: ServiceFramework{system_, name, ServiceThreadType::CreateNew}, room_network{
|
||||
system_.GetRoomNetwork()} {
|
||||
: ServiceFramework{system_, name, ServiceThreadType::CreateNew} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, &BSD::RegisterClient, "RegisterClient"},
|
||||
@@ -924,13 +899,6 @@ BSD::BSD(Core::System& system_, const char* name)
|
||||
// clang-format on
|
||||
|
||||
RegisterHandlers(functions);
|
||||
|
||||
if (auto room_member = room_network.GetRoomMember().lock()) {
|
||||
proxy_packet_received = room_member->BindOnProxyPacketReceived(
|
||||
[this](const Network::ProxyPacket& packet) { OnProxyPacketReceived(packet); });
|
||||
} else {
|
||||
LOG_ERROR(Service, "Network isn't initalized");
|
||||
}
|
||||
}
|
||||
|
||||
BSD::~BSD() = default;
|
||||
|
||||
@@ -7,17 +7,14 @@
|
||||
#include <vector>
|
||||
|
||||
#include "common/common_types.h"
|
||||
#include "common/socket_types.h"
|
||||
#include "core/hle/service/service.h"
|
||||
#include "core/hle/service/sockets/sockets.h"
|
||||
#include "network/network.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Network {
|
||||
class SocketBase;
|
||||
class Socket;
|
||||
} // namespace Network
|
||||
|
||||
@@ -33,7 +30,7 @@ private:
|
||||
static constexpr size_t MAX_FD = 128;
|
||||
|
||||
struct FileDescriptor {
|
||||
std::unique_ptr<Network::SocketBase> socket;
|
||||
std::unique_ptr<Network::Socket> socket;
|
||||
s32 flags = 0;
|
||||
bool is_connection_based = false;
|
||||
};
|
||||
@@ -168,14 +165,6 @@ private:
|
||||
void BuildErrnoResponse(Kernel::HLERequestContext& ctx, Errno bsd_errno) const noexcept;
|
||||
|
||||
std::array<std::optional<FileDescriptor>, MAX_FD> file_descriptors;
|
||||
|
||||
Network::RoomNetwork& room_network;
|
||||
|
||||
/// Callback to parse and handle a received wifi packet.
|
||||
void OnProxyPacketReceived(const Network::ProxyPacket& packet);
|
||||
|
||||
// Callback identifier for the OnProxyPacketReceived event.
|
||||
Network::RoomMember::CallbackHandle<Network::ProxyPacket> proxy_packet_received;
|
||||
};
|
||||
|
||||
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
||||
|
||||
@@ -22,9 +22,7 @@ enum class Errno : u32 {
|
||||
AGAIN = 11,
|
||||
INVAL = 22,
|
||||
MFILE = 24,
|
||||
MSGSIZE = 90,
|
||||
NOTCONN = 107,
|
||||
TIMEDOUT = 110,
|
||||
};
|
||||
|
||||
enum class Domain : u32 {
|
||||
@@ -98,6 +96,10 @@ struct Linger {
|
||||
u32 linger;
|
||||
};
|
||||
|
||||
constexpr u32 FLAG_MSG_DONTWAIT = 0x80;
|
||||
|
||||
constexpr u32 FLAG_O_NONBLOCK = 0x800;
|
||||
|
||||
/// Registers all Sockets services with the specified service manager.
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system);
|
||||
|
||||
|
||||
@@ -25,8 +25,6 @@ Errno Translate(Network::Errno value) {
|
||||
return Errno::MFILE;
|
||||
case Network::Errno::NOTCONN:
|
||||
return Errno::NOTCONN;
|
||||
case Network::Errno::TIMEDOUT:
|
||||
return Errno::TIMEDOUT;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", value);
|
||||
return Errno::SUCCESS;
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "core/internal_network/network.h"
|
||||
#include "core/internal_network/network_interface.h"
|
||||
#include "core/internal_network/sockets.h"
|
||||
#include "network/network.h"
|
||||
|
||||
namespace Network {
|
||||
|
||||
@@ -115,10 +114,7 @@ Errno TranslateNativeError(int e) {
|
||||
return Errno::NETDOWN;
|
||||
case WSAENETUNREACH:
|
||||
return Errno::NETUNREACH;
|
||||
case WSAEMSGSIZE:
|
||||
return Errno::MSGSIZE;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
|
||||
return Errno::OTHER;
|
||||
}
|
||||
}
|
||||
@@ -129,6 +125,7 @@ using SOCKET = int;
|
||||
using WSAPOLLFD = pollfd;
|
||||
using ULONG = u64;
|
||||
|
||||
constexpr SOCKET INVALID_SOCKET = -1;
|
||||
constexpr SOCKET SOCKET_ERROR = -1;
|
||||
|
||||
constexpr int SD_RECEIVE = SHUT_RD;
|
||||
@@ -209,10 +206,7 @@ Errno TranslateNativeError(int e) {
|
||||
return Errno::NETDOWN;
|
||||
case ENETUNREACH:
|
||||
return Errno::NETUNREACH;
|
||||
case EMSGSIZE:
|
||||
return Errno::MSGSIZE;
|
||||
default:
|
||||
UNIMPLEMENTED_MSG("Unimplemented errno={}", e);
|
||||
return Errno::OTHER;
|
||||
}
|
||||
}
|
||||
@@ -335,6 +329,16 @@ PollEvents TranslatePollRevents(short revents) {
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Errno SetSockOpt(SOCKET fd, int option, T value) {
|
||||
const int result =
|
||||
setsockopt(fd, SOL_SOCKET, option, reinterpret_cast<const char*>(&value), sizeof(value));
|
||||
if (result != SOCKET_ERROR) {
|
||||
return Errno::SUCCESS;
|
||||
}
|
||||
return GetAndLogLastError();
|
||||
}
|
||||
|
||||
} // Anonymous namespace
|
||||
|
||||
NetworkInstance::NetworkInstance() {
|
||||
@@ -346,16 +350,26 @@ NetworkInstance::~NetworkInstance() {
|
||||
}
|
||||
|
||||
std::optional<IPv4Address> GetHostIPv4Address() {
|
||||
const auto network_interface = Network::GetSelectedNetworkInterface();
|
||||
if (!network_interface.has_value()) {
|
||||
LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface");
|
||||
const std::string& selected_network_interface = Settings::values.network_interface.GetValue();
|
||||
const auto network_interfaces = Network::GetAvailableNetworkInterfaces();
|
||||
if (network_interfaces.size() == 0) {
|
||||
LOG_ERROR(Network, "GetAvailableNetworkInterfaces returned no interfaces");
|
||||
return {};
|
||||
}
|
||||
|
||||
std::array<char, 16> ip_addr = {};
|
||||
ASSERT(inet_ntop(AF_INET, &network_interface->ip_address, ip_addr.data(), sizeof(ip_addr)) !=
|
||||
nullptr);
|
||||
return TranslateIPv4(network_interface->ip_address);
|
||||
const auto res =
|
||||
std::ranges::find_if(network_interfaces, [&selected_network_interface](const auto& iface) {
|
||||
return iface.name == selected_network_interface;
|
||||
});
|
||||
|
||||
if (res != network_interfaces.end()) {
|
||||
char ip_addr[16] = {};
|
||||
ASSERT(inet_ntop(AF_INET, &res->ip_address, ip_addr, sizeof(ip_addr)) != nullptr);
|
||||
return TranslateIPv4(res->ip_address);
|
||||
} else {
|
||||
LOG_ERROR(Network, "Couldn't find selected interface \"{}\"", selected_network_interface);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) {
|
||||
@@ -398,19 +412,7 @@ Socket::~Socket() {
|
||||
fd = INVALID_SOCKET;
|
||||
}
|
||||
|
||||
Socket::Socket(Socket&& rhs) noexcept {
|
||||
fd = std::exchange(rhs.fd, INVALID_SOCKET);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Errno Socket::SetSockOpt(SOCKET fd_, int option, T value) {
|
||||
const int result =
|
||||
setsockopt(fd_, SOL_SOCKET, option, reinterpret_cast<const char*>(&value), sizeof(value));
|
||||
if (result != SOCKET_ERROR) {
|
||||
return Errno::SUCCESS;
|
||||
}
|
||||
return GetAndLogLastError();
|
||||
}
|
||||
Socket::Socket(Socket&& rhs) noexcept : fd{std::exchange(rhs.fd, INVALID_SOCKET)} {}
|
||||
|
||||
Errno Socket::Initialize(Domain domain, Type type, Protocol protocol) {
|
||||
fd = socket(TranslateDomain(domain), TranslateType(type), TranslateProtocol(protocol));
|
||||
@@ -421,7 +423,7 @@ Errno Socket::Initialize(Domain domain, Type type, Protocol protocol) {
|
||||
return GetAndLogLastError();
|
||||
}
|
||||
|
||||
std::pair<SocketBase::AcceptResult, Errno> Socket::Accept() {
|
||||
std::pair<Socket::AcceptResult, Errno> Socket::Accept() {
|
||||
sockaddr addr;
|
||||
socklen_t addrlen = sizeof(addr);
|
||||
const SOCKET new_socket = accept(fd, &addr, &addrlen);
|
||||
@@ -632,8 +634,4 @@ bool Socket::IsOpened() const {
|
||||
return fd != INVALID_SOCKET;
|
||||
}
|
||||
|
||||
void Socket::HandleProxyPacket(const ProxyPacket& packet) {
|
||||
LOG_WARNING(Network, "ProxyPacket received, but not in Proxy mode!");
|
||||
}
|
||||
|
||||
} // namespace Network
|
||||
|
||||