mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 15:45:38 +00:00
Added copying of macOS systems template upon application startup.
This commit is contained in:
parent
49fd0c90e9
commit
541f7202d8
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// Provides game file data structures and functions to access and sort this information.
|
// Provides game file data structures and functions to access and sort this information.
|
||||||
// Also provides functions to look up paths to media files and for launching games
|
// Also provides functions to look up paths to media files and for launching games
|
||||||
// (launching initiated by the ViewController).
|
// (launching initiated in ViewController).
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "FileData.h"
|
#include "FileData.h"
|
||||||
|
@ -650,7 +650,7 @@ void FileData::launchGame(Window* window)
|
||||||
// Expand home path if ~ is used.
|
// Expand home path if ~ is used.
|
||||||
command = Utils::FileSystem::expandHomePath(command);
|
command = Utils::FileSystem::expandHomePath(command);
|
||||||
|
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64)
|
||||||
std::wstring commandWide = Utils::String::stringToWideString(command);
|
std::wstring commandWide = Utils::String::stringToWideString(command);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ void FileData::launchGame(Window* window)
|
||||||
}
|
}
|
||||||
|
|
||||||
// For Windows, we need to handle UTF-16 encoding.
|
// For Windows, we need to handle UTF-16 encoding.
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64)
|
||||||
std::wstring emuExecutableWide;
|
std::wstring emuExecutableWide;
|
||||||
std::wstring emuPathWide;
|
std::wstring emuPathWide;
|
||||||
|
|
||||||
|
@ -717,7 +717,7 @@ void FileData::launchGame(Window* window)
|
||||||
LOG(LogDebug) << commandRaw;
|
LOG(LogDebug) << commandRaw;
|
||||||
LOG(LogInfo) << "Expanded emulator launch command:";
|
LOG(LogInfo) << "Expanded emulator launch command:";
|
||||||
|
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64)
|
||||||
LOG(LogInfo) << Utils::String::wideStringToString(commandWide);
|
LOG(LogInfo) << Utils::String::wideStringToString(commandWide);
|
||||||
returnValue = launchEmulatorWindows(commandWide);
|
returnValue = launchEmulatorWindows(commandWide);
|
||||||
#else
|
#else
|
||||||
|
@ -737,7 +737,7 @@ void FileData::launchGame(Window* window)
|
||||||
else {
|
else {
|
||||||
// Stop showing the game launch notification.
|
// Stop showing the game launch notification.
|
||||||
window->stopInfoPopup();
|
window->stopInfoPopup();
|
||||||
#ifdef _WIN64
|
#if defined(_WIN64)
|
||||||
// This code is only needed for Windows, where we may need to keep ES running while
|
// This code is only needed for Windows, where we may need to keep ES running while
|
||||||
// the game/emulator is in use. It's basically used to pause any playing game video
|
// the game/emulator is in use. It's basically used to pause any playing game video
|
||||||
// and to keep the screensaver from activating.
|
// and to keep the screensaver from activating.
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
//
|
//
|
||||||
// Provides game file data structures and functions to access and sort this information.
|
// Provides game file data structures and functions to access and sort this information.
|
||||||
// Also provides functions to look up paths to media files and for launching games
|
// Also provides functions to look up paths to media files and for launching games
|
||||||
// (launching initiated by the ViewController).
|
// (launching initiated in ViewController).
|
||||||
//
|
//
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
|
@ -362,10 +362,13 @@ bool SystemData::copyConfigTemplate(const std::string& path)
|
||||||
|
|
||||||
LOG(LogInfo) << "Attempting to copy template es_systems.cfg file from the resources directory.";
|
LOG(LogInfo) << "Attempting to copy template es_systems.cfg file from the resources directory.";
|
||||||
|
|
||||||
#if defined (_WIN64)
|
#if defined(_WIN64)
|
||||||
systemsTemplateFile = ResourceManager::getInstance()->
|
systemsTemplateFile = ResourceManager::getInstance()->
|
||||||
getResourcePath(":/templates/es_systems.cfg_windows");
|
getResourcePath(":/templates/es_systems.cfg_windows");
|
||||||
#elif defined(__unix__) || defined (__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
|
systemsTemplateFile = ResourceManager::getInstance()->
|
||||||
|
getResourcePath(":/templates/es_systems.cfg_macos");
|
||||||
|
#elif defined(__unix__)
|
||||||
systemsTemplateFile = ResourceManager::getInstance()->
|
systemsTemplateFile = ResourceManager::getInstance()->
|
||||||
getResourcePath(":/templates/es_systems.cfg_unix");
|
getResourcePath(":/templates/es_systems.cfg_unix");
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue