Commit Graph

25163 Commits

Author SHA1 Message Date
Michael Maltese e9328e5fa0 gettextize: extract arguments to Qt's `tr` 2017-07-22 22:35:25 -07:00
Anthony ccfd2e502e Merge pull request #5811 from lioncash/leak
TraversalClient: Fix memory leaks in ReleaseTraversalClient()
2017-07-22 15:49:53 -07:00
Lioncash 5859914da5 TraversalClient: Fix memory leaks in ReleaseTraversalClient()
release() relinquishes ownership of a pointer, it doesn't actually free
it.
2017-07-22 18:19:25 -04:00
Leo Lam efd318df64 Merge pull request #5791 from leoetlino/wiimote-indicator
Remove Wii Remote connection status from status bar
2017-07-22 22:03:25 +08:00
JosJuice 57affaff22 Merge pull request #5803 from leoetlino/pause-and-lock
Replace balanced Core::PauseAndLock calls with RunAsCPUThread
2017-07-22 12:42:55 +02:00
Léo Lam 5729ac0fc6 Core: Replace recursive locking from PauseAndLock
PauseAndLock cannot be called recursively anymore.
2017-07-21 16:45:59 +08:00
Léo Lam f106a9637d Replace balanced Core::PauseAndLock calls with RunAsCPUThread
Core::PauseAndLock requires all calls to it to be balanced, like this:

    const bool was_unpaused = Core::PauseAndLock(true);
    // do stuff on the CPU thread
    Core::PauseAndLock(false, was_unpaused);

Aside from being a bit cumbersome, it turns out all callers really
don't need to know about was_unpaused at all. They just need to do
something on the CPU thread safely, including locking/unlocking.

So this commit replaces Core::PauseAndLock with a function that
makes both the purpose and the scope of what is being run on the
CPU thread visually clear. This makes it harder to accidentally run
something on the wrong thread, or forget the second call to
PauseAndLock to unpause, or forget that it needs to be passed
was_unpaused at the end.

We also don't need comments to indicate code X is being run on the
CPU thread anymore, as the function name makes it obvious.
2017-07-21 16:45:59 +08:00
Anthony 2f0bec93cb Merge pull request #5801 from JosJuice/remove-gci-region-check
Remove region mismatch check for GCI folders
2017-07-20 22:49:59 -07:00
JosJuice 1fc5830d0c Remove region mismatch check for GCI folders
The region mismatch check that we used can give false positives.
Skipping the check won't lead to any harm - games will ignore
save files that have a non-matching fourth game ID character.
2017-07-20 15:24:07 +02:00
Leo Lam c207a1072d Merge pull request #5795 from JosJuice/gc-region-detection
Improve GameCube region detection
2017-07-20 14:13:11 +08:00
Anthony 39e17ccc41 Merge pull request #5793 from spycrab/qt_fullscreen_fix
Qt: Fix missing window border after exiting fullscreen under Windows
2017-07-19 08:52:22 -07:00
Leo Lam baf950c417 Merge pull request #5796 from JosJuice/findfileinfo-find
Use find_first_not_of in FileSystemGCWii::FindFileInfo
2017-07-19 21:52:13 +08:00
Pierre Bourdon 5461cf211d Merge pull request #5800 from ligfx/lintstrictmode
Tools/lint.sh: turn on Bash 'strict mode'
2017-07-19 00:56:49 +02:00
Michael Maltese 6939590598 Tools/lint.sh: turn on Bash 'strict mode'
Now fails if any commands fail. I noticed that on the buildbot, the
arguments to this script can be incorrect (somehow?) which can result in
no lint checks happening but the buildbot still passing.
2017-07-18 15:36:15 -07:00
JosJuice bcdab8af48 Automatic translation resources sync with Transifex 2017-07-17 14:18:34 +02:00
Anthony 42f2851fa1 Merge pull request #5655 from Starsam80/qt-settings-size
Qt: Shrink settings window and make widgets stretch
2017-07-16 14:35:18 -07:00
Starsam80 c6478cac2f
Qt: Shrink settings window and make widgets stretch 2017-07-16 14:50:52 -06:00
JosJuice c83cac7cca Fix the handling of NTSC-K for GCI folders 2017-07-16 16:31:12 +02:00
JosJuice be8e93f472 Ensure that Volume::GetRegion doesn't return invalid enum values 2017-07-16 14:52:17 +02:00
JosJuice db1c534b3e Add warning comments to RegionSwitch and code that uses it 2017-07-16 14:49:28 +02:00
JosJuice cd60810d9d Improve Japanese check in TitleDatabase
We should check the language of a game rather than the region.
RegionSwitchGC counts W as NTSC-J, and W games aren't in Japanese.
2017-07-16 14:33:14 +02:00
JosJuice c8b4645039 Detect Korean GC releases as Korean when possible
According to http://scanlines16.com/en/blog-3/retro-gaming/game-cube/gamecube-korean-master-list/,
Korean GC releases use the following country codes:
- E or W for games in English
- K for games in Korean
- Unknown value for games in Japanese (my guess is that they might
  have made the discs bit-for-bit identical to Japanese releases
  because the regions of these games are already set to NTSC-J)

As far as I know, the GC has no Taiwanese releases, which is what
the W country code is used for on the Wii. But I could be wrong.

A small note: The country_byte == 'K' check in the code isn't
actually necessary as long as RegionSwitchGC returns NTSC_J
for 'K', but I thought it would be better to not rely on that.
2017-07-16 14:30:41 +02:00
JosJuice ebf0f64a01 Detect GC region based on the actual region value
The county code isn't 100% reliable for detecting the region.
For instance, some games released in Korea have the country
code E even though they're region-locked to NTSC-J consoles.

This commit makes the GC disc region detection match the Wii
disc region detection (apart from the region value being in
a different place on the disc).
2017-07-16 14:29:43 +02:00
JosJuice fe10e8aa6c Fix RegionSwitchGC for the value 'K'
Korean GameCube releases have their region set to NTSC-J.
2017-07-16 13:52:53 +02:00
JosJuice c64d668c3c Use find_first_not_of in FileSystemGCWii::FindFileInfo 2017-07-16 13:19:18 +02:00
spycrab e3cf1e4f37 Qt: Fix missing window border after exiting fullscreen under Windows 2017-07-16 01:09:36 +02:00
Jules Blok ba356f78d1 Merge pull request #5774 from Armada651/d3d-fs-fixes
D3DBase: Set the fullscreen state in Create()
2017-07-15 15:01:46 +02:00
Léo Lam 91f8283a1d Remove Wii Remote connection status from status bar
Showing the Wii remote connection status leads to inconsistent UX,
because we don't do anything like that for GameCube controllers
or with Bluetooth passthrough.

It's also questionable how useful it is given that:

* it doesn't print the number of connected remotes, just that one
  remote is connected, connecting or not connected, so the only info
  it provides is actually wrong when using multiple remotes;

* this user-facing feature is actually broken in master and no one has
  complained AFAIK, which means people don't really rely on it;

* the status bar isn't visible most of the time unless the user is
  using render to main or deliberately keeping the main window's
  status bar visible by moving the render window and they're not too
  far away from their screen;

* emulated Wii remotes now reconnect on input, which means that there
  is less of a need to actually know at all times whether a remote
  is connected, since pressing any button will reconnect it and provide
  immediate, visible feedback via OSD messages and the Wii remote
  pointer appearing.
2017-07-15 13:01:56 +08:00
Leo Lam bacc35d99e Merge pull request #5733 from leoetlino/import-context
IOS/ES: Merge the title import and export contexts
2017-07-14 23:34:37 +08:00
Jules Blok 37e06586b8 Merge pull request #5784 from leoetlino/movie-buffer
Movie: Get rid of the manual buffer management
2017-07-14 13:20:27 +02:00
Léo Lam 777d150f83 Movie: Get rid of the manual buffer management
Tracking a buffer's size manually and storing it under a name that
does not make it obvious it is related to the buffer is really... meh.

Also gets rid of the need to manually manage its capacity and
new/delete an array.
2017-07-14 16:15:05 +08:00
Léo Lam 1ba1b51606 IOS/ES: Rename context.title_import
This makes it obvious that the same context is used for both
title imports and exports.
2017-07-14 13:23:21 +08:00
Léo Lam dc1707faa8 IOS/ES: Merge the title import and export contexts
This commit merges the import and export contexts into a single context
because this is what IOS does, which means we can only reproduce its
behaviour correctly if we use a single context for both operations.

The other reason is that having two separate and very similar structs
is not really a good idea.

While working on this commit, I was notified that our handling of
ImportTmd/ExportTitleInit is not correct. In particular, we always use
the title key for both importing and exporting, which is wrong. To make
this easier to fix in a follow-up PR, the context now also has a title
key field, just like ES. This also lets us avoid computing it every
single time in ImportContentDone.
2017-07-14 13:23:21 +08:00
Léo Lam 0dff8a3bde IOS/ES: Separate title content functions from IPC handlers
Allows them to be reused easily. Still a bit too much duplicated code
in my opinion (OpenContent/SeekContent/ReadContent should just call
FS code), but this is a start.
2017-07-14 13:23:21 +08:00
Leo Lam 460b81ac06 Merge pull request #5778 from ligfx/fixinputbitmaps
DolphinWX: fix input bitmaps not working when background input is off
2017-07-14 13:08:13 +08:00
Leo Lam d7efac6ed5 Merge pull request #5780 from spycrab/qt_header_save
Qt: Save sorting order
2017-07-14 13:05:41 +08:00
Leo Lam 4c2a4c38c3 Merge pull request #5782 from ligfx/fixqtinput
Qt: allow emulation input when background input is disabled
2017-07-14 13:05:09 +08:00
Michael Maltese ebeac18472 DolphinQt2/Host: cleanup 2017-07-13 12:58:32 -07:00
Michael Maltese 8e55374662 RenderWidget: watch for activation/deactivation, not focus in/out
"Focus" refers mainly to keyboard focus. "Window focus" is exposed
through the window activation and deactivation events.
2017-07-13 12:58:32 -07:00
Michael Maltese 8d5fe1f1c4 RenderWidget: mark 'event' function as override 2017-07-13 12:58:32 -07:00
JosJuice 100b0a52d3 Merge pull request #5777 from JosJuice/unify-getgameinifilenames
Unify GetGameIniFilenames
2017-07-12 19:24:46 +02:00
spycrab 8ca6814673 Qt: Save sorting order 2017-07-12 18:25:54 +02:00
Michael Maltese 0019c34c73 DolphinWX: fix input bitmaps not working when background input is off 2017-07-12 00:12:07 -07:00
Anthony ab5a5ee3ea Merge pull request #5726 from mimimi085181/minimal-tmem-cache-emulation
Implement minimal emulation of TMEM caching
2017-07-11 22:49:19 -07:00
JosJuice d4f5038571 Unify GetGameIniFilenames
This deduplicates code and fixes the new config system's lack of
1-char game ID INI support.
2017-07-11 13:10:11 +02:00
Leo Lam 1de9bf2cca Merge pull request #5743 from spycrab/qt_fix_shutdown
Qt: Fix multiple emulation shutdown bugs
2017-07-11 09:13:07 +02:00
Leo Lam ce4732dd96 Merge pull request #5776 from sepalani/kd-log
NetKDTime: Log IOCtl
2017-07-11 00:40:37 +02:00
Leo Lam b6c3479bb4 Merge pull request #5720 from JosJuice/file-metadata
FileUtil: Redesign Exists/IsDirectory/GetSize
2017-07-11 00:28:34 +02:00
Leo Lam 12f6d0b56b Merge pull request #5773 from JosJuice/builtin-titledatabase-optional
Make the built-in wiitdb files optional
2017-07-11 00:20:09 +02:00
Leo Lam 38e32c6324 Merge pull request #5775 from leoetlino/hardcoded-fs-usage
IOS/FS: Remove hardcoded FS usage data
2017-07-11 00:18:55 +02:00