From b8c63663493ad7a5450751c7c780b5486059b52f Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 23 Aug 2020 18:41:08 +0200 Subject: [PATCH] (macOS) Made the game launching more seamless. --- CONTRIBUTING.md | 2 +- INSTALL.md | 2 ++ NEWS.md | 8 +++----- README.md | 11 +++++++++-- es-core/src/renderers/Renderer.cpp | 19 ++++++++++++++++--- 5 files changed, 31 insertions(+), 11 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46cf61da6..7a2c3394d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ It's impossible for me to test every game system (rbsimple-DE has support for mo And it's a fact that some configuration is simply missing in these files for some systems, so that would need to be added as well. -In general, a review of the [es_systems.cfg_unix](resources/templates/es_systems.cfg_unix), [es_systems.cfg_macos](resources/templates/es_systems.cfg_macos) and [es_systems.cfg_windows](resources/templates/es_systems.cfg_windows) files including the supported file extensions would be great. +In general, a review of the [es_systems.cfg_unix](resources/templates/es_systems.cfg_unix), [es_systems.cfg_macos](resources/templates/es_systems.cfg_macos) and [es_systems.cfg_windows](resources/templates/es_systems.cfg_windows) files including the supported file extensions would be great! As for rbsimple-DE there are quite some missing graphic files and other customizations for a number of game systems. Check out [MISSING.md](themes/rbsimple-DE/MISSING.md) for more details of what needs to be added or updated. diff --git a/INSTALL.md b/INSTALL.md index 89ff740af..d23ee298b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -269,6 +269,8 @@ Keep in mind though that a debug version will be much slower due to all compiler Running `make -j6` (or whatever number of parallel jobs you prefer) speeds up the compilation time if you have cores to spare. +**Note:** According to the SDL documentation, there could be issues with attempting to run ES from the build directory when using a High DPI display as the required NSHighResolutionCapable key is not set as there is no Info.plist file available. In this case, doing a 'make install' and running ES from the installation folder would solve the problem. I've been unable to verify if this is really required though as I don't have the necessary hardware to test it on. + **Installing:** As macOS does not have any package manager which would have handled the library dependencies, we need to bundle the required shared libraries with the application. Copy the following .dylib files from their respective installation directories to the emulationstation-de build directory: diff --git a/NEWS.md b/NEWS.md index ed27144c1..6089949ae 100644 --- a/NEWS.md +++ b/NEWS.md @@ -4,9 +4,7 @@ ### Release overview -First release, a major update to the application compared to the RetroPie version on which it is based. This includes new gamelist sorting logic, new game media handling and a completely updated Windows port (which works about as well as the Unix version). The menu system has also been completely overhauled and the scraper has been expanded to support multiple media types (including videos) as well as providing detailed scraping configuration options. - -Work has started on a macOS port too. It already runs more or less correctly, but is not completely ready for general use as of this version. +First release, a major update to the application compared to the RetroPie version on which it is based. This includes new gamelist sorting logic, new game media handling and an updated Windows port as well as a macOS port (which both work about as well as the Unix version). The menu system has also been completely overhauled and the scraper has been expanded to support multiple media types (including videos) as well as providing detailed scraping configuration options. Full navigation sound support has been implemented, and the metadata editor has seen a lot of updates including color coding of all changes done by the user and by the scraper. Favorite games can now also be sorted on top of the gamelists and game collections. @@ -29,7 +27,7 @@ Many bugs have been fixed, and numerous features that were only partially implem * New default theme rbsimple-DE bundled with the software, this theme is largely based on recalbox-multi by the Recalbox community * Added extensive es_systems.cfg templates for Unix and Windows * Updated the application to compile and work on Microsoft Windows, including full UTF-16 (Unicode) support -* Updated the application to compile and work (more or less) on Apple macOS +* Updated the application to compile and work on Apple macOS * Seamless (almost) launch of games without showing the desktop when starting and when returning from RetroArch and other emulators * Per-game launch command override, so that different cores or emulators can be used on a per-game basis (saved to gamelist.xml) * Core location can be defined relative to the emulator binary using the %EMUPATH% variable in es_systems.cfg (mostly useful for Windows) @@ -55,7 +53,7 @@ Many bugs have been fixed, and numerous features that were only partially implem * All required fonts bundled with the application, no dependencies on the OS to provide them any longer * Made pugixml an external dependency instead of bundling it * Updated the CMake/CPack install and package build script to work as expected (it can now generate .deb, .rpm, .dmg and NSIS installation packages) -* Added support for Clang/LLVM, made the application build with no errors or warnings using this compiler (Unix only) +* Added support for Clang/LLVM, made the application build with no errors or warnings using this compiler (Unix and macOS only) * License files included for all the libraries and resources that are bundled with the application * Greatly expanded the application documentation (which is hosted with the source repository on GitLab) * Updated the MAME ROM index files to include ROMs up to MAME version 0.221 and created scripts to easily generate these index files in the future diff --git a/README.md b/README.md index 7937afad3..fce4c07bd 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,16 @@ EmulationStation Desktop Edition is a cross-platform graphical front-end for emu Maybe you're familiar with EmulationStation: yes there are multiple forks available for this software! However this version is intended for use primarily on desktop computers where it's not the primary interface for the computer. As such, the aim is not to provide full control over emulator settings or emulator button mappings, or include system administration functions and similar. Instead it's assumed that the emulators and the overall environment has been properly configured upfront. -The goal is to make the software as easy as possible to install and use, and to suppport the major desktop operating systems: Unix/Linux, Windows and macOS (although the macOS port is still a work in progress). +The goal is to make the software as easy as possible to install and use, and to suppport the major desktop operating systems: Unix/Linux, macOS and Windows. -With that said it's possible that the application still compiles and works on devices such as the Raspberry Pi, I've certainly not deliberately removed any code specific to such platforms and this fork is after all based on the RetroPie version of EmulationStation. +The following operating systems have been tested and confirmed as working with ES: + +* Kubuntu 20.04 +* macOS 10.11.6 (El Capitan) +* Windows 10 (x86) +* Windows 8.1 (x86) + +It's possible that the application still compiles and works on devices such as the Raspberry Pi, but again it's not the goal of this fork to run on such devices. The software comes preconfigured for use primarily with [RetroArch](https://www.retroarch.com), although this can be changed as all emulator settings are fully configurable, even on a per-game basis. diff --git a/es-core/src/renderers/Renderer.cpp b/es-core/src/renderers/Renderer.cpp index 2bd8160cb..0cce46cb0 100644 --- a/es-core/src/renderers/Renderer.cpp +++ b/es-core/src/renderers/Renderer.cpp @@ -96,6 +96,11 @@ namespace Renderer // games or when manually switching windows using task switcher). SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0"); + #if defined(__APPLE__) + // Not sure if this could be a useful setting for some users. +// SDL_SetHint(SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES, "0"); + #endif + setupWindow(); unsigned int windowFlags; @@ -111,9 +116,17 @@ namespace Renderer windowFlags = getWindowFlags(); #if defined(__APPLE__) else - // This seems to be the best fullscreen mode on macOS as the taskbar switcher - // works etc. while still filling the entire screen with the application window. - windowFlags = SDL_WINDOW_FULLSCREEN_DESKTOP | getWindowFlags(); + // This seems to be the only window mode that somehow works on macOS as a real + // fullscreen mode will do lots of weird stuff like preventing window switching + // or refusing to let emulators run at all. Fullscreen desktop mode almost works, + // but it "shuffles" windows when starting the emulator and won't return properly + // when the game has exited. With the current mode, the top menu is visible and + // hides that part of the ES window. Also, the splash screen is not displayed + // until the point where ES has almost completely finished loading. I'm not sure + // if anything can be done to improve these things as it's quite obvious that + // Apple has shipped a broken and/or dysfunctional window manager with their + // operating system. + windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALLOW_HIGHDPI | getWindowFlags(); #else else if (Settings::getInstance()->getString("FullscreenMode") == "borderless") windowFlags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_ALWAYS_ON_TOP | getWindowFlags();