ExecuteCommand was becoming pretty confusing with unused variables
for some commands, confusing names (device ID != IOS file descriptor),
duplicated checks, not keeping the indentation level low, and having
tons of things into a single function.
This commit gives more correct names to variables, deduplicates the
device checking code, and splits ExecuteCommand so that it's
easier to read.
It's worth noting that some device checks have been forgotten in the
past, which has caused a bug (which was recently fixed in 288e75f6).
GCMemcard is only used outside of the core and has
no real reason to use the core's RTC. GetEmulatedTime
isn't designed to be called when the core isn't running.
Should fix https://bugs.dolphin-emu.org/issues/9871
From what I can tell, the emulated GPU places (0,0) at the lower left of
the image, and we were generating texture coordinates so that (0,0) was
at the upper-left in the expansion geometry shader, causing textures
used by point sprites to be flipped vertically.
Fixes the upside-down A button in Mario Golf.
Since in this case we're setting it based on the state at record start
time, not when a register is loaded, UseMemory would not be called, so
this could potentially wipe out texture memory that was valid.
This should ensure that when playing with loop enabled, the first frame is
in the same state each time. There is potentially still issues when the
start frame is set to something other than zero, but I'm not sure how we
could work around this without capturing the entire state on each frame.
Doing it from the add dialogs instead would prevent the call to these dialogs outside of a breakpointWindow which would be necessary for hotkeys binding.
Instead of needing different switch cases for
converting countries to regions in multiple places,
we now only need a single country-to-region switch case
(in DiscIO/Enums.cpp), and we get a nice Region type.
This also makes it a strongly-typed enum.
Considering that the flushing mode is a trait/behavior for the register
cache, it doesn't really make sense to have the enum separate from it.
This also has the benefit of removing constants from global scope.
This is done to not have the device combo box be too small in width when making the main sizer fit into the window. Not fitting the sizer would alternatively break Hidpi so it was best to just add an empty sizer to workaround this problem.
I think it's best to remove these if we are going to be adding new hotkeys since these would work no matter what so I can simply make these the default one instead.