Dolphin Progress Report: February and March 2020

We understand that the past few months have been trying for many of us across the world. Something like this can make what you do feel so very small in the grand scheme of things. Everyone has their ways of coping with isolation, using the internet, games, emulation, and much more as forms of entertainment to keep spirits up. To those of you relying on Dolphin Emulator, we hope that Dolphin Emulator makes your day a little brighter in these trying times.

In this Progress Report, you'll find that we've got a lot of changes affecting things outside of core emulation. For instance, Dolphin on Android and macOS see the return of Dark Mode, perfect for late night gaming without straining your eyes. But if we're going to talk about the main event, we have a new way to use your Wii Remotes that brings tremendous flexibility. People that were disappointed by the removal of Hybrid Wii Remotes, forced Wii Remote disconnections on Save/Loadstates, and other limitations of Real Wii Remotes should be very excited. With two months of changes to get through, it's about time we just dived in. Please enjoy the February and March Progress Report!

Notable Changes

5.0-11655 - Update to Qt 5.14.1 by spycrab

People opening up Dolphin and zooming through the GUI may notice things are a bit nicer. That's because spycrab updated Dolphin from Qt 5.13.1 to the latest version, 5.14.1! This new Qt version comes with LOT of new improvements from our friends in Qt land (for details click here). Many of their fixes don't apply to Dolphin, but we do benefit from the improved HiDPI support. This is especially noticeable on mixed DPI scaling multi-monitor setups.

The left display is at 1.5x DPI scaling, and the right is at 2x. In the old version of Qt, Dolphin would be scaled to the largest scaling used anywhere, so Dolphin on the left side is at 2x. It's huge.
But thanks to the Qt update, now Dolphin's scaling will change to match the scaling of monitor it is on. Dolphin is now the same size on both displays, as it should be.

There are still a few quirks. If Dolphin is opened on an unscaled displays and moved to a scaled display, it can still break. Fortunately, this breakage appears consistent and users can easily avoid it by opening up Dolphin on a scaled monitor in those setups. Overall, Dolphin should behave more consistently on HiDPI displays.

5.0-11684 - Add Support for Wii Remotes over InputCommon by Billiard

Hybrid Wii Remote was a favorite feature for many of our users. This option allowed users to mix and match their physical Wii Remotes' input with input from other devices. For example, a user could use a Wii Remote without a sensor bar by mapping the pointer to their mouse, or they could use a Wii Remote and "Nunchuk" but using an Xbox One controller as the Nunchuk. It was a very useful feature, but it was tremendously buggy. It's notorious instability came from its code - Hybrid Wii Remote was hacked on top of Dolphin's old Real Wii Remote code, and it was considered hacky even then, when our standards were at their lowest. It was so bad, that even after two major rewrites to Dolphin's Wii Remote code, no one went anywhere near Hybrid Wii Remote. But it was very useful and a fan favorite, so rather than be rightfully removed, it was ignored. This status quo was maintained for many years, but all of that neglect took its toll. By 2018, Hybrid Wii Remote was pretty much entirely broken, and we had to act. In May of 2018, Hybrid Wii Remote was removed from Dolphin. It was our hope that by removing it, it would open the door for a better implementation that matched modern code quality standards. We are pleased to say that our hope has now been realized.

Billiard has been doing tremendous work lately overhauling every bit of our input system, from better indicators, more advanced input parsing, to even Emulated Motion Plus! So when thinking about Hybrid Wii Remote, Billiard posed the question: Why not just connect the Wii Remote through our already powerful InputCommon so they can take advantage of all the features that other controllers already get? So that's what he did.

With this change, Dolphin can now grab any connected Wii Remote and hook it up to our controller mapping system, InputCommon. This allows Wii Remotes to be mapped just like any other controller on your computer. Finally, you can have your Real Wii Remote in your hand and remap its sensors and buttons however you like. But this new system allows for so much more than that. The number of possibilities is so high, to even give you a few examples we have to use a list! And this is just scratching the surface of the possibilities.

  • Any button can be any other button just like when mapping other controllers. For example, do you want to press B instead of A to fire in Resident Evil 4: Wii edition? You can do that!
  • Want to use your Wii Remote without a sensor bar, the key feature of the old Hybrid Wii Remote? Map the Wii Remote's accelerometer and gyro into our Motion Input tab and enable pointer emulation, and Dolphin will use your Wii Remotes sensors to determine where your Wii Remote is pointing without needing a sensor bar, just as we do with other motion controllers! Or you can use a mouse for pointing just like before, for the classic Hybrid Wii Remote experience.
  • You can combine physical motions you perform with our motion simulation system so that you can use physical motions for the more complicated sections but buttons for simple motions like shaking to spin. This is very useful in games like Super Mario Galaxy and Twilight Princess!
  • You can use your Wii Remote and/or its attachments as a GameCube controller. For those lucky enough to have the original Classic Controller (not Pro), you can even get analog R and L triggers!
  • You can tell a game one attachment is connected and use/configure another, allowing for more comfortable gaming experiences with games that only support certain attachments.
  • Netplay with a physical Wii Remote? Finally possible!
  • Want to control hotkeys with your Wii Remote? It works the same as using any other controller for hotkeys.
  • The separation provided by using a physical Wii Remote as an emulated controller makes it no longer necessary to disconnect Wii Remotes when loading savestates. In fact, you can take things a step further and map Savestate/Loadstate hotkeys directly to your Wii Remote buttons or button combinations using Dolphin's advanced configuration panels!

And this is only the tip of the iceberg. This opens physical Wii Remotes to the full depths of Dolphin's mapping system. Users can combine this with our advanced expression parser and mapping controller settings as expressions shown below for some proper shenanigans! This is an incredibly powerful feature that goes far far beyond merely replacing Hybrid Wii Remote! And this time around, this is proper clean code that takes advantage of systems that already exist in Dolphin, so we're confident the feature will stick around.

To use this new feature, turn on Connect Wii Remotes for Emulated Controllers, then connect each Wii Remote by either pressing refresh and the sync button at the same time, or just press the sync button if continuous scanning is enabled. Once your Wii Remote is connected, simply set the Wii Remote you wish to configure to Emulated Wii Remote and head onto the controller configuration page like you would for any other controller. In the controller dropdown, your Wii Remote will show up under Bluetooth/(x)/Wii Remote with x referring to the Wii Remote number in the order you connected them.

Just turn on this feature, connect your Wii Remote, and press configure on the Wii Remote you wish to setup.
Set the device, and then configure it like any other controller!

There are some limitations with this new feature though. All of the power of Wii Remotes for Emulated Controllers comes at the cost of requiring the user to manually map and configure each Wii Remote they wish to use. We intend to provide a profile with all of the standard Wii Remote mappings built in to make this easier, but for now you have to do it all yourself. However, even with profiles, it will never be as easy as Real Wii Remote's ability to just connect and play. Another limitation is that Wii Remote speaker audio is currently not being sent to the Wii Remote, and goes to system speakers instead. This can be a bit of a blessing with how sketchy Wii Remote audio is without Bluetooth Passthrough, but we can also see it as being frustrating for games that use the feature extensively. The biggest issue of Wii Remotes for Emulated Controllers is that we have to emulate any attachments you want to use. Dolphin emulates pretty much every main attachment, but there are cases where we've found bugs in attachments we emulated and have had to add new, rare attachments. Plus, users have to configure all of their attachments manually as well.

Still, even with these complications, Wii Remotes for Emulated Controllers is a sea change for what is possible with Wii Remotes in Dolphin! Power users can effectively do ANYTHING. We may have been missing a favorite feature for two years, but it was certainly worth the wait.

A couple of final notes. First is that Real Wii Remote is not being replaced. It may not have any of these excellent features, but its plug-and-play nature is still our most accessible way to use Wii Remotes in Dolphin, and that is something we don't want to lose. Also, none of these changes apply to Bluetooth Passthrough. That is a separate option where we give the emulated environment direct control over a Bluetooth device. As such, Dolphin has no knowledge about connected Wii Remotes or the state of the Bluetooth adapter. While this allows you to bypass a large chunk of emulation for real behaviors, and bypasses a great deal of issues in the process, it also limits what the emulator can do. None of these features or enhancements will ever apply to Bluetooth passthrough.

5.0-11637 - InputCommon: Allow controller settings specified with input expressions by Billiard

For many many years, users have been able to use the advanced controller settings window to create input expressions, combining input with variables to unlock tremendous flexibility within our input system. Over the past few years, it has been expanded significantly, now applying to hotkeys as well as controller input, and having many more advanced functions.

Alright, you wanna get nuts?
Come on, let's get nuts!

This time, it's not input expressions that have seen a big change, but rather an expansion to what they apply to. While working on Real Wii Remotes for Emulated Controllers, Billiard noted that changing attachments on the Wii Remote would not change the configured attachment in Dolphin, requiring users to open the controller settings and swap it there. Instead of hard coding a way to handle only that situation, Billiard has intend expanded our input expressions to also cover controller settings. This now allows Wii Remotes for Emulated Controllers to swap attachments automatically, once configured to do so.

The icon shows that the value is under the control of a controller input. Right now, there is no attachment connected.
But when an extension is connected, Dolphin notices and changes the setting for us! Click for an example configuration.

But Billiard is sneaky, and knew that doing the change this way would allow so much more than only that. By opening all controller settings to be changed with our input expressions, you can now apply the full power of our advanced controller options to ANY controller setting or feature! For example, it is possible to alter the physical motions of your Wii Remote (as emulated controller) or Dual Shock 4 (via DSUServer) to become finer or bigger while holding a button. It's possible to increase freqency of a shaking or bouncing motion while holding a button, for optimal Mario Party cheating! You can even configure Dolphin so that if you are holding the aim down sight button in a game like Call of Duty: Modern Warfare, the pointer will become more precise as you hold that aim button. If you have a niche config that you were never able to do before, this, combined with all of the prior enhancements to our input parser, have probably made that configuration possible!

This is just a little sample of what this can do.

This change also allows reporting a physical controller's battery level to the game, so the battery level shown is actually your controller's battery. With this, Wii Remotes for Emulated Controllers can pass their battery information through to the game! But it also works with any controller that reports its battery level, such as Xinput devices and Dual Shock 4 controllers using DSUServer, so you can have your 360 controller's battery level show in a Wii game! However, it's a bit weird with non-Wii Remotes due to how AA batteries work and how Wii Remotes convert their voltages to a battery level. For example, during testing for this Progress Report, we noticed that 66% battery on an Xbox One controller is shown as 100% (4 bars) in game. However, with some tweaks using our incredibly powerful input expression parser, it can work well.

That battery level is from an Xbox One controller! Click through to see an example configuration.

As a small note, the new features brought by this change make the Relative Input Hold mapping and the entire Emulated Wii Remote Hotkeys group redundant. Eventually these options will be removed, but rest assured that when we do so, we'll be sure to implement a system that will transfer configurations for those settings over to the new system.

5.0-11669 - Fix Gecko codes loading by Itrimel

Due to an oversight, certain systems could have locale issues that prevented Gecko Codes from being interpreted correctly. The source of the issue was that some locales allow spaces within a single formatted number. That means "1 2 3" is read as "123". In this case, the French locale would read something like "0245A3CD 01266363" as a single value rather than two separate values. The first half of the code is meant to be an address, with the second value being what the address is being set to. When Dolphin reads all of this as one value, the code is treated as invalid because it overflows the address.

In order to rectify this, Dolphin's gecko loader is now forced to use C Locale so that the codes will load correctly regardless of locale.

5.0-11698 - Re-enable Qt Dark Mode by spycrab0

In 5.0-9745, dark mode lovers moaned as we disabled MacOS dark mode for Dolphin. But we didn't really have much choice, as the version of Qt that we were using at the time had issues that caused several glitches throughout Dolphin while in dark mode.

That's not really how the button text is supposed to look...

Users were reporting the issue and asking for us to fix it, but it was a Qt bug, not a Dolphin bug, and it was out of our hands. So we decided it was best to just disable dark mode support and wait for Qt to fix it on their end. And now they have! Thanks to a lot of work by Qt's developers, as of Qt 5.14 all of the issues we have had with macOS are fixed! So after we updated to Qt 5.14.1 this month, we took a peek at macOS dark mode and confirmed it was working, and made the feature available to MacOS Dolphin users once again.

Normally Dolphin on MacOS looks bright and cheery.
But now Dolphin can be black as night!

Although going to dark mode automatically changes basically everything on its own, it does not change Dolphin's icon theme. So if you leave the icon theme on the default dark grey "Clean" theme and switch to dark mode, you'll have grey icons on a dark grey background, which may be difficult to see on some displays. So for dark mode, we recommend either switching the icon theme to "Clean Lite" which was specifically made for dark modes, or using one of our color icon themes. Or just matte black everything if you like it.

Hello darkness my old friend...

5.0-11810 - Android: System Controlled Day/Night Mode by TheRealPSV

Dark mode fans have yet more to celebrate this month as Progress Report newcomer TheRealPSV has brought system controlled dark and light themes to Android! So now when Android's theme is changed, Dolphin will match it. For dark mode fans, that means you can have dark mode in Dolphin Android without using 3rd party apps for the first time!

Dolphin as you know it.
But now dark!

This should work very well with the upcoming "Dark Mode Scheduling" feature in Android 11. Assuming nothing explodes, we haven't actually tried it yet. It probably won't explode.


Last Month's Contributors...

Special thanks to all of the contributors that incremented Dolphin from 5.0-11610 through to 5.0-11824!

You can continue the discussion in the forum thread of this article.

Next entry

Previous entry

Similar entries