Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Langerz82/a448cc1b3c998cdc612078dda87864cc to your computer and use it in GitHub Desktop.
Save Langerz82/a448cc1b3c998cdc612078dda87864cc to your computer and use it in GitHub Desktop.
emuelec-emulationstation - video_mode - enable to be passed to sh.
diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp
index 462d0be5..aad46993 100644
--- a/es-app/src/FileData.cpp
+++ b/es-app/src/FileData.cpp
@@ -444,6 +444,8 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options)
const std::string rom = Utils::FileSystem::getEscapedPath(getPath());
const std::string basename = Utils::FileSystem::getStem(getPath());
const std::string rom_raw = Utils::FileSystem::getPreferredPath(getPath());
+ const std::string video_emu = SystemConf::getInstance()->get(system->getName() + ".videomode");
+ const std::string video_global = SystemConf::getInstance()->get("global.videomode");
command = Utils::String::replace(command, "%SYSTEM%", systemName); // batocera
command = Utils::String::replace(command, "%ROM%", rom);
@@ -453,6 +455,9 @@ bool FileData::launchGame(Window* window, LaunchGameOptions options)
command = Utils::String::replace(command, "%EMULATOR%", emulator);
command = Utils::String::replace(command, "%CORE%", core);
command = Utils::String::replace(command, "%HOME%", Utils::FileSystem::getHomePath());
+ command = Utils::String::replace(command, "%VIDEO_EMU%", video_emu);
+ command = Utils::String::replace(command, "%VIDEO%", video_global);
+
if (options.netPlayMode != DISABLED && (forceCore || gameToUpdate->isNetplaySupported()) && command.find("%NETPLAY%") == std::string::npos)
command = command + " %NETPLAY%"; // Add command line parameter if the netplay option is defined at <core netplay="true"> level
diff --git a/es-app/src/guis/GuiMenu.cpp b/es-app/src/guis/GuiMenu.cpp
index 61329970..c67e1f79 100644
--- a/es-app/src/guis/GuiMenu.cpp
+++ b/es-app/src/guis/GuiMenu.cpp
@@ -4350,12 +4350,12 @@ void GuiMenu::popSpecificConfigurationGui(Window* mWindow, std::string title, st
}
// video resolution mode
- if (systemData->isFeatureSupported(currentEmulator, currentCore, EmulatorFeatures::videomode))
- {
+ //if (systemData->isFeatureSupported(currentEmulator, currentCore, EmulatorFeatures::videomode))
+ //{
auto videoResolutionMode_choice = createVideoResolutionModeOptionList(mWindow, configName);
systemConfiguration->addWithLabel(_("VIDEO MODE"), videoResolutionMode_choice);
systemConfiguration->addSaveFunc([configName, videoResolutionMode_choice] { SystemConf::getInstance()->set(configName + ".videomode", videoResolutionMode_choice->getSelected()); });
- }
+ //}
// smoothing
if (systemData->isFeatureSupported(currentEmulator, currentCore, EmulatorFeatures::smooth))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment