Commit graph

7180 commits

Author SHA1 Message Date
Pengfei Zhu
6b538a49ac
Merge pull request #4246 from FearlessTobi/port-1346
Port yuzu-emu/yuzu#1346: "svc_wrap: Convert the PARAM macro into a function"
2018-09-23 13:10:11 +08:00
Weiyi Wang
20e42592ff
Merge pull request #4249 from FearlessTobi/port-760
Port yuzu-emu/yuzu#760: "file_util: Use an enum class for GetUserPath()"
2018-09-22 23:42:59 -04:00
Weiyi Wang
e087cb9a28 string_util: unify UTF8<->UTF16 conversion to codecvt 2018-09-22 17:23:48 -04:00
James Rowe
90c891406f
Merge pull request #4258 from jroweboy/gitattributes
Meta: Add gitattributes file
2018-09-22 15:03:55 -06:00
James Rowe
d6f303c6db Meta: Add gitattributes file
Github Linguist will read this file when calculating language stats for
the repository. We can use this to exclude any vendored dependencies in
externals and dist. Also makes all h files be considered cpp
2018-09-22 14:59:15 -06:00
James Rowe
cd20ca0e2a
Merge pull request #4226 from valentinvanelslande/enum
citra.py: use IntEnum for request types
2018-09-22 14:30:42 -06:00
James Rowe
ded7e1f7c3
Merge pull request #4245 from wwylele/thread-cleanup
Common/Thread cleanup
2018-09-22 14:27:06 -06:00
Pengfei Zhu
5d597d6339 Fix icon licenses (#4250)
* Fix license.txt and Fix license.md
2018-09-22 14:26:14 -06:00
Weiyi Wang
5b66c41686
Merge pull request #4251 from FearlessTobi/port-1309
Port yuzu-emu/yuzu#1309: "service: Use nested namespace specifiers where applicable"
2018-09-22 16:15:48 -04:00
James Rowe
3f4a7f8f58 Input: Remove global variables from SDL Input
Changes the interface as well to remove any unique methods that
frontends needed to call such as StartJoystickEventHandler by
conditionally starting the polling thread only if the frontend hasn't
started it already. Additionally, moves all global state into a single
SDLState class in order to guarantee that the destructors are called in
the proper order
2018-09-22 14:13:50 -06:00
Weiyi Wang
1123580738 archive_ncch: add open source country list archive 2018-09-22 16:11:57 -04:00
James Rowe
bfcc712132 Input: Copy current SDL.h/cpp files to impl
This should make reviewing much easier as you can then see what changed
happened between the old file and the new one
2018-09-22 14:11:15 -06:00
Lioncash
d2cd4a464d svc_wrap: Convert the PARAM macro into a function
This can just be a regular function, getting rid of the need to also
explicitly undef the define at the end of the file. Given FuncReturn()
was already converted into a function, it's #undef can also be removed.
2018-09-22 21:20:22 +02:00
Lioncash
b3221c3180 file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-09-22 21:18:56 +02:00
Weiyi Wang
e1765e7c5c string_util: remove TString conversion for windows
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
2018-09-22 13:03:59 -04:00
Weiyi Wang
7db46da4fc
Merge pull request #4247 from FearlessTobi/port-1314
Port yuzu-emu/yuzu#1314: "audio_core/time_stretch: Silence truncation warnings in Process()"
2018-09-22 12:02:51 -04:00
Weiyi Wang
6d4a8a21db
Merge pull request #4248 from FearlessTobi/port-1321
Port yuzu-emu/yuzu#1321: "cubeb_sink: Get rid of variable shadowing within CubebSink's constructor"
2018-09-22 12:02:06 -04:00
Lioncash
46da908a00 service: Use nested namespace specifiers where applicable
There were a few places where nested namespace specifiers weren't being
used where they could be within the service code. This amends that to
make the namespacing a tiny bit more compact.
2018-09-22 16:14:10 +02:00
Lioncash
bcb1aaf05c cubeb_sink: Get rid of variable shadowing within CubebSink's constructor
The parameter of the lambda was shadowing the variable that was being
assigned to.
2018-09-22 12:55:40 +02:00
Lioncash
553bdb2ae4 audio_core/time_stretch: Silence truncation warnings in Process()
The SoundTouch API only accepts uint amount of samples.
2018-09-22 12:52:13 +02:00
Weiyi Wang
16b22128bf string_util: remove ShiftJIS/CP1252 conversion function
We always use unicode internally. Any dirty work of conversion with other codec should be handled by frontend framework (Qt). Further more, ShiftJIS/CP1252 are not special (they are not code set used by 3ds, or any guest/host dependencies we have), so there is no reason to specifically include them
2018-09-22 00:45:50 -04:00
Weiyi Wang
1855fb3d88 common/thread: remove YieldCPU()
simply use the standard library yield()
2018-09-22 00:32:19 -04:00
Weiyi Wang
1e9d60cab6 common/thread: remove unnecessary macro for thread_local
we have bumped compiler version really high that all of them support this
2018-09-22 00:30:56 -04:00
Weiyi Wang
41d53cee1f nwm/uds_data: specify endianness for enum 2018-09-22 00:28:44 -04:00
Weiyi Wang
e0336403ee nwm/uds_connection: specify endiannes for enum 2018-09-22 00:28:44 -04:00
Weiyi Wang
16b36b6025 service/cro: specify endianness for enum 2018-09-22 00:28:44 -04:00
Weiyi Wang
18e94897c4 hle/swkbd: specify endianness for enum and other members 2018-09-22 00:28:44 -04:00
Weiyi Wang
39feb0610b filesys/archive_selfncch: specify endiannes for enum 2018-09-22 00:28:44 -04:00
Weiyi Wang
9564b4b292 filesys/archive_ncch: specify endianness for enum
NCCHArchivePath::media_type is unchanged because its underlying type is unclear
2018-09-22 00:28:44 -04:00
Weiyi Wang
2badaf43b0 common/swap: add swap template for enum 2018-09-22 00:28:44 -04:00
Valentin Vanelslande
21bdc03908
Force camera pixel format to RGB565 on Linux 2018-09-21 18:28:46 -05:00
Lioncash
03908116ae game_list: Handle plurals within setFilterResult() better
Qt provides an overload of tr() that operates on quantities in relation
to pluralization. This also allows the translation to adapt based on the
target language rules better.

For example, the previous code would result in an incorrect translation
for the French language (which doesn't use the pluralized version of
"result" in the case of a total of zero. While in English it's
correct to use the pluralized version of "result", that is, "results"

---

For example:

English: "0 results"

French: "0 résultat" (uses the singular form)

In French, the noun being counted is singular if the quantity is 0 or 1.
In English, on the other hand, if the noun being counted has a quantity
of 0 or N > 1, then the noun is pluralized.

---

For another example in a language that has different counting methods
than the above, consider English and Irish. Irish has a special form of
of a grammatical number called a dual. Which alters how a word is
written when N of something is 2. This won't appear in this case with a
direct number "2", but it would change if we ever used "Two" to refer to
two of something. For example:

English: "Zero results"

Irish: "Toradh ar bith"

English: "One result"

Irish: "Toradh amháin"

English: "Two results"

Irish: "Dhá thorthaí" <- Dual case

Which is an important distinction to make between singular and plural,
because in other situations, "two" on its own would be written as "dó"
in Irish. There's also a few other cases where the order the words are
placed *and* whether or not the plural or singular variant of the word
is used *and* whether or not the word is placed after or between a set
of numbers can vary. Counting in Irish also differs depending on whether or not
you're counting things (like above) or counting people, in which case an
entirely different set of numbers are used.

It's not important for this case, but it's provided as an example as to why one
should never assume the placement of values in text will be like that of
English or other languages. Some languages have very different ways to
represent counting, and breaking up the translated string like this
isn't advisable because it makes it extremely difficult to get right
depending on what language a translator is translating text into due to
the ambiguity of the strings being presented for translation.

In this case a translator would see three fragmented strings on
Transifex (and not necessarily grouped beside one another, but even
then, it would still be annoying to decipher):

- "of"
- "result"
- "results"

There is no way a translator is going to know what those sets of words
are actually used for unless they look at the code to see what is being
done with them (which they shouldn't have to do).
2018-09-21 17:45:14 -05:00
Weiyi Wang
80cdfe1c45
Merge pull request #4240 from valentinvanelslande/port-yuzu-1379
Port #1379 from yuzu: "gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map()"
2018-09-21 18:26:01 -04:00
Lioncash
333b6a556a gl_stream_buffer: Fix use of bitwise OR instead of logical OR in Map()
This was very likely intended to be a logical OR based off the
conditioning and testing of inversion in one case.

Even if this was intentional, this is the kind of non-obvious thing one
should be clarifying with a comment.
2018-09-21 17:20:42 -05:00
Weiyi Wang
d1a576eb14
Merge pull request #4113 from namkazt/soc_recv_from
fix soc service - RecvFrom - SendTo
2018-09-21 12:33:23 -04:00
Weiyi Wang
e9ed1c98da
Merge pull request #4114 from namkazt/soc_recv_from_other
Implement soc - RecvFromOther
2018-09-21 12:33:12 -04:00
Weiyi Wang
59982c5479
Merge pull request #4221 from FearlessTobi/port-1238
Port #1238 from yuzu: "common/logging: Minor changes"
2018-09-21 12:32:53 -04:00
Weiyi Wang
a6fb17bf66
Merge pull request #4214 from FreddyFunk/citra-qt-startup-project
Set citra-qt project as default StartUp Project in Visual Studio
2018-09-21 12:30:53 -04:00
fearlessTobi
3ee9f669c1 Address review comments 2018-09-21 16:39:10 +02:00
Lioncash
1cf3ef15b9 common/logging: Amend documentation comments
Multi-line doc comments still need the '<' after the ///, otherwise it's
treated as a regular comment and makes the original doc comment broken
in viewers, IDEs, etc. While we're at it, also fix some typos in the
comments.
2018-09-21 16:26:21 +02:00
Frederic Laing
d8f09f69eb Addressed feedback 2018-09-21 14:48:55 +02:00
Frederic Laing
596700cb3a Merge branch 'citra-qt-startup-project' of https://github.com/FreddyFunk/citra into citra-qt-startup-project 2018-09-21 14:48:00 +02:00
Frederic Laing
c4bf626b88 Addressed feedback 2018-09-21 14:47:43 +02:00
Frederic Laing
cc3404a097 Set citra-qt project as default StartUp Project in Visual Studio
Set citra-qt project as default StartUp Project in Visual Studio
2018-09-21 14:46:20 +02:00
Merry
bb9e92c77c
Merge pull request #4194 from MerryMage/audiofifo
audio_core: Simplify sink interface
2018-09-21 13:30:51 +01:00
zhupengfei
31dc9003c5
citra_qt/configuration: Add Play Coins setting 2018-09-20 22:42:39 +08:00
James Rowe
687e3e74ca
Merge pull request #3959 from zhaowenlan1779/semi-reset
service/apt: Implement soft reset & CloseApplication
2018-09-19 21:02:59 -06:00
Weiyi Wang
b2367f9a70
Merge pull request #4227 from spbennett/xbyak-5.71
Xbyak 5.71
2018-09-19 22:35:50 -04:00
MerryMage
c9c7097769 ring_buffer: Fix Push 2018-09-19 07:14:36 +01:00
Weiyi Wang
697bc1a9c7 loader, cfg: choose region based on language if multiple regions available 2018-09-18 10:26:31 -04:00