Commit Graph

130 Commits

Author SHA1 Message Date
EmptyChaos 00a4404045 CheatManager/ISOProperties: Refactor ActionReplay tabs as a class
Refactor Action Replay code into its own class like Gecko Codes.
2016-08-31 14:32:12 +10:00
Aestek 51c77e8eea Add md5 testing to netplay
Allows to test current game, an arbitrary game or the sdcard of all players
at once.
2016-07-16 22:48:46 +02:00
JosJuice 0a15aaaa12 Move DiscIO enums to a new file
At first there weren't many enums in Volume.h, but the number has been
growing, and I'm planning to add one more for regions. To not make
Volume.h too large, and to avoid needing to include Volume.h in code
that doesn't use volume objects, I'm moving the enums to a new file.
I'm also turning them into enum classes while I'm at it.
2016-07-13 17:29:27 +02:00
Pierre Bourdon 3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
EmptyChaos 309d0e59f4 ISOProperties/GameListCtrl: Use Global INI Change event.
ISOProperties no longer needs its hack to refresh the game list, the
new INI Modified event can be used instead.
2016-05-30 00:49:11 +10:00
EmptyChaos 6ab1b27477 ActionReplay: UI Consistency and Cleanup
Cleanup code style.

Move ActionReplay code->INI saving into ActionReplay namespace.

Threadsafety Cleanup: ActionReplay is accessed from the Host, Emu
and CPU Threads so the internal storage needs to be protected by a
lock to prevent vectors/strings being deleted/moved while in use by
the CPU Thread.

UI Consistency: Make ARCodes behave like Gecko Codes - only apply
changes when Apply is pressed. Save changes to INI from CheatsWindow.

ISOProperties/CheatsWindow now synchronize with each other.
2016-05-29 23:33:24 +10:00
EmptyChaos 25b072ff2b ActionReplay: Fix ISOProperties corrupting active code set
ISOProperties loads codes using ActionReplay::LoadCodes which actually applies
the codes to the global state. If a game is running then that games receives
all the codes (and ACTIVE status) from the second game being shown in
ISOProperties which is not desirable.
2016-05-29 23:33:24 +10:00
EmptyChaos 97d570f0c9 DriveReader: Fix View > Show Drives
DriveReader::m_size was never initialized which was indirectly
causing CGameListCtrl to crash Dolphin when it tried to insert a
character at a negative index in a string.

Reading one sector at a time is very inefficient and appears to
be causing timing issues during boot so SectorReader has been
enhanced to support batching.

SectorReader has been given a working cache system.
2016-04-26 21:24:08 +10:00
JosJuice 81466d7fa3 DolphinWX: Stop using XPM images
Using the XPM format for images has become a maintenance problem because
people don't know how to create them. This commit removes all XPM images
and all C files that contain PNG images. DolphinWX now uses the PNGs
in the Resources folder instead, just like DolphinQt and DolphinQt2 do.
2016-01-05 19:11:58 +01:00
Jules Blok 9a1b2f68cc ISOProperties: Replace the ConvergenceMinimum option by the Convergence option.
The ConvergenceMinimum was replaced by Convergence in the GameINI.
2015-12-22 23:16:27 +01:00
Lioncash edbbf493f8 DiscIO: Make factory methods return unique_ptrs
Rather than rely on the developer to do the right thing,
just make the default behavior safely deallocate resources.

If shared semantics are ever needed in the future, the
constructor that takes a unique_ptr for shared_ptr can
be used.
2015-12-07 05:57:37 -05:00
Markus Wick b0dbb6ef46 Merge pull request #3067 from JosJuice/cheat-manager-regression
Fix Cheat Manager not saving created codes
2015-12-02 14:08:32 +01:00
Tillmann Karras 00aefa5e08 DolphinWX: decompress discs to calculate MD5 hash 2015-10-12 02:35:43 +02:00
Tillmann Karras 063446c46f mbedTLS: run rename.pl script and fix errors 2015-09-25 03:46:41 +02:00
JosJuice 42db9e2897 Remove odd way of getting ID in ISOProperties
Other code (like GameListItem) simply calls GetUniqueID,
and I've never seen that lead to any problems.
2015-09-21 17:46:05 +02:00
JosJuice 17edcc4fc7 Fix Cheat Manager not saving created codes 2015-09-19 17:20:16 +02:00
JosJuice 210aa774d5 DolphinWX: Only read titles.txt once
titles.txt is read into a map and passed to the GameListItem
constructor, making game list scanning a bit more efficient.

ISOPropreties's constructor is changed to take a GameListItem as an
argument instead of creating one on its own, because ISOPropreties
doesn't have the titles.txt map that the GameListItem constructor wants.
2015-09-13 14:17:58 +02:00
Lioncash 113cc119de Merge pull request #2829 from JosJuice/fix-wii-fst-size-2
Fix reading Wii FST size (for real this time)
2015-09-12 00:50:00 -04:00
Lioncash 19459e827f Partially revert "General: Toss out PRI macro usage" 2015-09-11 09:49:00 -04:00
Lioncash 8fdb013d54 General: Toss out PRI macro usage
Now that VS supports more printf specifiers, these aren't necessary
2015-09-05 16:02:35 -04:00
Lioncash 7aa76a84ef DolphinWX: Fix memory leaks occurring in ISOProperties
This would only occur for Wii discs. While the tree data itself would be deleted, the allocated contents of it were not.
2015-08-16 05:40:07 -04:00
JosJuice e0a47c11f5 Fix reading Wii FST size (for real this time)
04fcb72 fixed an issue with reading the Wii FST size, but I found a second
issue when working on PR #2820 - the size must be shifted left by 2.
DiscScrubber and Boot already do this correctly using separate code.
2015-08-10 16:35:23 +02:00
Lioncash 7ee0e75633 Remove unnecessary virtual keywords 2015-07-30 10:33:08 -04:00
Lioncash b8706791d5 DolphinWX: Pass string by const reference in CISOProperties constructor 2015-07-08 09:48:07 -04:00
degasus c375111076 Options: merge SCoreStartupParameter into SConfig 2015-06-12 19:07:45 +02:00
Ryan Houdek 881f6db2ab Merge pull request #2509 from comex/fix-ar-codes
Fix subdialogs of the ISO props dialog... sort of
2015-06-08 04:13:16 -04:00
JosJuice 0ed3118141 Volume: Return volume type as an enum
ISOFile and GameFile were using IsWiiDisc() and IsWadFile() to set
an enum value. The volume might as well return an enum directly.

I increased the Qt CACHE_REVISION because m_platform now is saved as u32
instead of int, but increasing the wx CACHE_REVISION is not necessary.
2015-06-04 16:26:36 +02:00
comex 2ae6fb9240 Merge pull request #2338 from JosJuice/getfilelist-return
Filesystem: Return file list reference instead of modifying argument
2015-06-02 20:28:25 -04:00
comex 3af30d12ed Fix subdialogs of the ISO props dialog... sort of
On OS X, if you close a subdialog of the ISO Properties dialog, such as
the one to add a new AR code, the main Dolphin window would magically
get raised above ISO Properties.  This is confusing, to say the least;
when I encountered this the other day, I thought the dialog was actually
getting closed.

I *think* the diagnosis looks like this:
Cocoa expects NSPanel (not to be confused with wxPanel) to be for things
like find dialogs, font dialogs with the little title bars, sheets, etc.
See:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
Therefore, NSPanels return NO for canBecomeMainWindow, which is
documented; and when [NSWindow orderOut:] is called to hide a window,
Cocoa seems to want to make the window it focuses in its place a main
window, which, as far as I can tell, is not.  So if the next highest
window is a panel, it gets skipped over.  (I tested this by overriding
wxNSPanel's canBecomeMainWindow to return YES, in which case the right
window gets focused, but this isn't a correct fix.)

The ISO Properties dialog does have grounds to be a dialog/panel - the
close button, whose positioning is provided by the wxDialog class.  This
is arguably simply a roundabout discovery that our UI sucks for an OS X
app and that to be consistent with other nonmodal preferences dialogs,
it shouldn't have such a button on OS X (though ESC to close is still
kosher).  However, I'm not willing to make that change right now, so...

Hack around the problem by calling Raise (on this) after each call to
ShowModal in CISOProperties.  The resulting behavior is slightly
glitchy, and I'd like to revisit it, but for now it fixes the issue.
2015-06-02 20:15:12 -04:00
Ryan Houdek b0b5f4d10d Merge pull request #2326 from JosJuice/isoproperties-config-block
ISOProperties: Don't block when opening default INI in text editor
2015-05-25 23:42:26 -04:00
Tillmann Karras 30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
JosJuice bad09fc358 Volume: Rename GetName to GetInternalName
This is intended to better separate it from GetNames and to clarify
that this name originally wasn't meant to be shown to users.
The ISOProperties GUI is also updated, mainly because labeling
the long banner name "short name" was confusing.
2015-05-11 11:19:30 +02:00
Lioncash 76bbd46829 Core: Remove some header inclusions in header files
Replaces them with forward declarations of used types, or removes them entirely if they aren't used at all. This also replaces certain Common headers with less inclusive ones (in terms of definitions they pull in).
2015-05-08 22:38:59 -04:00
Lioncash a7e9aea797 DolphinWX: Remove unnecessary includes 2015-05-08 12:39:26 -04:00
comex 6414cdabb2 Merge pull request #2286 from JosJuice/wii-opening-bnr
Read opening.bnr to get names from Wii discs
2015-05-05 16:20:04 -04:00
JosJuice d43a920924 Filesystem: Return file list reference instead of modifying argument 2015-04-28 12:48:05 +02:00
JosJuice db1d81ebf8 ISOProperties: Don't block when opening default INI in text editor
The purpose of blocking is to reload user INIs after they
have been edited. However, ISOProperties never reloads
default INIs, because they aren't meant to be edited.
Blocking on default INIs is thus useless, and it's
rather annoying for games that have two default INIs,
because it makes it impossible to see both at once.
2015-04-25 22:15:48 +02:00
JosJuice fbed0b4a9c ISOProperties: Correctly handle partitions with 0 files 2015-04-25 15:33:20 +02:00
JosJuice 2e10a71dcd Fix extracting files from Wii discs
I broke it for individual files but not folders in 4.0-6016.
2015-04-24 22:08:15 +02:00
JosJuice 235ecfbed7 Return GetNames languages, to avoid hardcoded language lists in callers
This makes the code cleaner and also leads to some user-visible changes:

The wx game properties will no longer let the user
select WAD languages that don't have any names.

The Qt game list will now display names using the languages
set in the configuration instead of always using
English for PAL GC games and Japanese for WADs.

If a WAD doesn't have a name in the user's preferred language,
English is now selected as a fallback before Japanese.
2015-04-23 08:14:39 +02:00
JosJuice 86ceb54c38 Fix extracting Wii disc partitions numbered 10 or higher
Instead of trying to get the partition number from the
(localized!) item name, the partitions are now stored as item data.
2015-04-15 09:29:24 +02:00
Lioncash 5d7cd29a8b ISOProperties: Remove unnecessary/unused variables & controls. 2015-04-10 19:53:58 -04:00
Stevoisiak 7c1ab2911a Move down Country_World
The countries are sorted alphabetically. This should have been changed
when the variable was renamed from Country_International to
Country_World
2015-04-08 18:55:16 -04:00
Lioncash eacf741051 DolphinWX/Common: Change some find_first_of usages to find
It's unnecessary to use find_first_of when all you're searching for is a single character.
2015-03-24 08:32:44 -04:00
JosJuice 4a41ab1715 Fix 4.0-5689 regression (AR codes, patches)
CreateCodeTab, ARCodeAddEdit and PatchAddEdit
need to be able to modify arCodes/onFrame.
2015-03-06 12:26:40 +01:00
Markus Wick 4f9fcbaba9 Merge pull request #2120 from JosJuice/show-default-gameini
ISOProperties: Allow opening region-free INIs with "Show Defaults" button
2015-02-27 17:58:42 +01:00
Rachel Bryk 2df8190e1a Make iso properties non modal. 2015-02-24 19:11:03 -05:00
JosJuice 2247bfa9bc Remove "Needed for a few games." from fast disc speed description
There are no longer any games that are known to require this.
The last one was Rogue Leader, fixed in PR #1778.
2015-02-24 20:06:38 +01:00
JosJuice 021f6d0f72 ISOProperties: Allow opening region-free INIs with "Show Defaults" button 2015-02-24 20:04:19 +01:00