This removes a Dolphin-specific patch to the wxWidgets3 code
for the following reasons:
* Calling wxWindowGTK::DoSetSize on a top-level window can end up
calling wxTopLevelWindowGTK::DoMoveWindow, which triggers an assert
because it is not supposed to be called for a top-level wxWindow.
* We should not be patching the wxWidgets code because that means the
toolbars will still be broken if someone builds without using the
WX that is in our Externals.
Instead, we now use a derived class for wxAuiToolBar and override
DoSetSize() to remove the problematic behaviour to get the same effect
(fixing toolbars) but without changing Externals code and without
causing asserts and other issues.
Now that our timings are much more accurate it doesn't look like we
need it anymore. And the instant ARAM DMA mode + scheduling fixes
ctually breaks ATV: Quad Power Racing 2 (causing all sorts of werid
bugs).
Fundamentally, all this does is enforce the invariant that we always
translate effective addresses based on the current BAT registers and
page table before we do anything else with them.
This change can be logically divided into three parts. The first part is
creating a table to represent the current BAT state, and keeping it up to
date (PowerPC::IBATUpdated, PowerPC::DBATUpdated, etc.). This does
nothing by itself, but it's necessary for the other parts.
The second part (mostly in MMU.cpp) is simply removing all the hardcoded
checks for specific untranslated addresses, and consistently translating
addresses using the current BAT configuration. Very straightforward, but a
lot of code changes because we hardcoded assumptions all over the place.
The third part (mostly in Memmap.cpp) is making the fastmem arena reflect
the current BAT configuration. We do this by redoing the mapping (calling
memmap()) based on the BAT table whenever it changes.
One additional minor change is that translation can fail in two ways:
either the segment is a direct store segment, or page table lookup failed.
The difference doesn't usually matter, but the difference affects cache
instructions, like dcbz.
For step over, it was updating twice which actually made the red display on the register view (when a register changes since) malfunction. Since it doesn't seem to be usefull to update before AND after the run, the one before the run was removed.
For step out, well, because there was no chances given for the thread to run as it is single stepping all the time, I only added a call to update after it was done.
Init cannot be called more than once because it registers the
CoreTiming callbacks, that trips the assertions and will cause
anyone with PanicAlerts disabled to crash.
CoreTiming gets restored before ExpansionInterface so CoreTiming
events need to already be registered before the save state loading
begins. This means that the callbacks must be registered
unconditionally instead of on-demand.
Replace adhoc linked list with a priority heap. Performance
characteristics are mostly the same, but is more cache friendly.
[Priority Queues have O(log n) push/pop compared to the linked
list's O(n) push/O(1) pop but the queue is not big enough for
that to matter, so linear is faster over linked. Very slight gains
when framelimit is unlimited (Wind Waker), 1900% -> 1950%]
Some compilers don't have an automatic abs() overload for floats.
Doesn't really matter if they use the integer variant here, but
it's better to be explicit about the fact that we're using floats.
Dolphin no longer lowers itself below the top window when opening.
Dolphin no longer draws garbage lines all over the game list.
Use the correct platform macros so Dolphin can actually find the
translation catalogs on Unix.
Both those in the code window and the ones that appears when the user select edit perpective. The one that isn't fixed by this is in edit perspective mode, when the user drags a panel out and it becomes a floating window.
When n was a multiple of 4, the old implementation would overwrite
the following register with 0.
This was causing Not64 to crash.
Thanks to Extrems for spotting this.
DVDInterface shouldn't need to know anything about
the DTM format's 40-character limitation.
Also replacing "filename" in variable names with "path"
to make it clearer which variables contain the whole path
and which ones only contain the filename.
memory check
Also fix an oddity in the case when the last memory check is deleted,
the jit cache was supposed to be cleared in that case, but it was out of
the for loop that finds the one to delete so it was never run.
Naturally, the same fix for the adding the first memory check was
applied.
The 'revert' functionality is some very old left-over and isn't even working properly (read: could break Wiimote mapping). As no dialog features any cancel and revert functionality it is removed.
It's not available in OpenGL ES and officially it's not supported on OpenGL 3.0/3.1.
Fallback to old depth range code if there is no method to disable depth clipping.
It's more important to have correct clipping than to have accurate depth values.
Inaccurate depth values can be fixed by slow depth.
The original code assumed that we would always find a button in
control_buttons. However, this is incorrect, since the iterator can and
will be control_buttons.end() if the button that triggered the iterate
code is not in control_buttons, which happens when it's in an
exclude list.
I'm not sure this is the correct fix, but it looks like OSREPORT output
is Shift-JIS, so we need to convert it to UTF-8. Most characters work
fine without and with this conversion, but Japanese text completely
fails and results in outputting invalid UTF-8 (which gets shown as �).
When 5.0-211 updated wxWidgets to 3.1.0, some entries in the
wxLanguage enum were moved and added, changing the wxLanguage
values. Because we save Dolphin's interface language to disk
as a wxLanguage, the language you have set will mean something
different depending on whether you have the updated wx version
or not. For instance, setting the language to English with the
updated version and then using an older version will make
Dolphin use Dutch. Because we can't rely on the enum anymore,
I'm replacing the "Language" setting with a "LanguageCode"
setting that uses standard ISO 639 codes.
The gather pipe optimization postpones checking the FIFO until the end
of the current block (or 32 bytes have been written). This is usually
safe, but is not correct across EIEIO instructions.
This is inferred from a block in NBA2K11 which synchronizes the FIFO
by writing a byte to it, executing eieio, and checking if PI_FIFO_WPTR
has changed. This is not currently an issue, but will become an issue
if the gather pipe optimization is applied to more stores.
Add the CCodeWindow to the constructor of the memoryWindow so it can call the notify update of the breakpoint list.
Add the case of breakpoint update when receiving an event (the update command was issued, but wasn't managed before).
Run clang format and renamed the code window names.
Let's stop pretending that we support Triforce emulation.
Keeping this code around just in case someone will make
major improvements in the future isn't really worth it.
I'm keeping the Triforce game INIs so users will know that
the compatibility rating for Triforce games is 1 star (broken).
OSD messages other than these one and a half aren't translated,
and OSD only supports ASCII. (Also, that "Wiimote %i %s" uses %s
like it does is bad for translation, but that's easy to fix.)
These operations should always take the same amount of time,
not the same amount of ticks. The number of ticks per second
is different for GameCube and Wii.
Replaces old and simple usages of std::atomic<bool> with Common::Flag
(which was introduced after the initial usage), so it's clear that
the variable is a flag and because Common::Flag is well tested.
This also replaces the ready logic in WiimoteReal with Common::Event
since it was basically just unnecessarily reimplementing Common::Event.
Specifically, don't make any assumptions about what effective addresses
are used for code, and correctly handle changes to MSR.DR/MSR.IR.
(Split off from dynamic-bat.)
This should help prevent breakage when the curl.h header is changed.
As far as I can tell this only increases the compile time by a hair, but prevents needing to create a PR every time curl.h gets updated. Alternatively I'm experimenting with CURL_STRICTER defined per a conversion with booto:
>booto | krakn: try having CURL_STRICTER defined for the build?
Credit goes to: flacs for the suggestion to include curl.h
Fix include
The default size might be too big for some screens. This allows
the user to modify the window as they see fit and has Dolphin
remember those settings. People who are happy with the default
size and position will not be affected
git diff --name-only already took care of only returning the name, so
the awk is unneeded and makes it return only empty file names.
Facepalm, I know. Sorry for this oversight.
(Also fixes something that lint didn't catch because of this)
Also fold the check in both functionss into 'slowmem' rather than having
a separate test. (jo.alwaysUseMemFuncs implies jo.memcheck anyway, as
makes sense.)
There is no reason to prevent the user from closing the config dialog
if the device is not found. It's not very good UX…
Also fixes ExpressionParser to return NO_DEVICE if the device doesn't
exist instead of SUCCESS.
This adds hotplugging support to the evdev input backend. We use
libudev to monitor changes to input devices in a separate thread.
Removed devices are removed from the devices list, and new devices
are added to the list.
The effect is that controllers are usable immediately after plugging
them without having to manually refresh devices (if they were
configured to be used, of course).
Changes UpdateInput() to skip if we can't lock the mutex, instead of
potentially blocking the CPU thread and causing a short but noticeable
frame drop.
This adds RemoveDevice() to ControllerInterface, fixes ExpressionParser
and some other code to support device removals without crashing,
and adds an IsValid() method to Device, to prepare for hotplugging.
This adds RegisterHotplugCallback() to register a callback which will
be invoked by the input backends' hotplug threads when there is a new
device, so that Core (GCKeyboard, GCPad, Wiimote, Hotkey) can reload
the configuration without adding a dependency to Core from InputCommon.
Since we now support different scanner sources, g_wiimotes is not
guaranteed to only contain WiimoteLinux anymore.
This replaces the previous "already connected" check with one that
doesn't use g_wiimotes.
Pausing emulation requires to access the CPU thread, which might be blocked
waiting for inputs by netplay. Accessing it in this state would cause the
whole GUI to hang for set timeout (10s).
Instead of sleeping in NetPlayClient::GetNetPads and NetPlayClient::WiimoteUpdate,
now use std::condition_variable. This allows for finer control over these blocking
areas.
This makes WiimoteScanner support several scanner backends.
This adds a WiimoteScannerBackend base class, which scanner backends
derive from, and which allows backend-specific things to be moved out
of the common code.
Also removes IODummy which is not needed anymore.
Once a tab is selected the focus can be set directly from the page
changed event. However once the tab was shown, the first tab order
control element was given the focus by default. This was fixed by
delaying the action and setting the focus after the default focus
had been assigned.
* Focus "Hash Code" / "IP address" text box by default in "Connect"
* Focus game list in "Host" tab
* RETURN keypress now host/join depending on selected tab
* Remember last hosted game
* Remove PanicAlertT:
* Simply log message to netplay window
* Remove them when they are useless
* Show some netplay message in OSD
* Chat messages
* Pad buffer changes
* Desync alerts
* Stop the game consistently when another player disconnects / crashes
* Prettify chat textbox
* Log netplay ping to OSD
Join scenario:
* Copy netplay code
* Open netplay
* Paste code
* Press enter
Host scenario:
* Open netplay
* Go to host tab
* Press enter
UPNP_AddPortMapping needs our IP address, however enet_address_get_host
will return 0.0.0.0 or a host name in most cases.
This gets our IP address from the socket to the IGD.
5.0-56 broke reconnecting a Wiimote on button press; this is because
data reporting was now always stopped for real Wii remotes on
disconnect, making it impossible to know a button was pressed in the
first place (to reconnect the Wiimote).
This semi-reverts to the previous behaviour, where data reporting is
never stopped.
(Also, control channels now go through WiimoteEmu, just like before,
to make sure some things are reset on disconnection.)
Hopefully fixes issue 9711.
This is something that was quite confusing for me while trying to get
netplay to work for me; once the Connect/Host buttons were pressed,
the UI would hang, only to work again a few seconds later, but with
no error message or explanation *at all*.
Turns out this is because panic alerts are shown in the netplay window
instead during netplay, even before it is even shown.
This fixes it by "piping" the alerts to the netplay chat only if the
netplay window is visible.
(regression introduced in #3823)