mirror of https://github.com/snes9xgit/snes9x.git
Qt: Portable mode. Fix hang on close.
This commit is contained in:
parent
2e3d5e1102
commit
c8b21fa461
|
@ -1 +1 @@
|
||||||
Subproject commit 197a273fd494321157f40a962c51b5fa8c9c3581
|
Subproject commit 4e2fdb25671c742a9fbe93a6034eb1542244c7e1
|
|
@ -1 +1 @@
|
||||||
Subproject commit 9c7fd1a33e5cecbe465e1cd70170167d5e40d398
|
Subproject commit 3ebb72cc7429f0ab8218104dc3687c659c0f364d
|
|
@ -297,6 +297,7 @@ void S9xImGuiInit(S9xImGuiInitInfo *init_info)
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::CreateContext();
|
ImGui::CreateContext();
|
||||||
|
ImGui::GetIO().IniFilename = nullptr;
|
||||||
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NoMouse;
|
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NoMouse;
|
||||||
ImGui::StyleColorsLight();
|
ImGui::StyleColorsLight();
|
||||||
ImFontGlyphRangesBuilder builder;
|
ImFontGlyphRangesBuilder builder;
|
||||||
|
|
|
@ -11,6 +11,11 @@ set(CMAKE_AUTOUIC ON)
|
||||||
set(CMAKE_AUTORCC ON)
|
set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_GLOBAL_AUTOGEN_TARGET ON)
|
set(CMAKE_GLOBAL_AUTOGEN_TARGET ON)
|
||||||
|
|
||||||
|
|
||||||
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||||
|
set(CMAKE_PREFIX_PATH "../external/qt6-mingw-clang-bin")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(DEFINES SNES9X_QT)
|
set(DEFINES SNES9X_QT)
|
||||||
set(SNES9X_CORE_SOURCES
|
set(SNES9X_CORE_SOURCES
|
||||||
../fxinst.cpp
|
../fxinst.cpp
|
||||||
|
|
|
@ -215,6 +215,8 @@ void EmuApplication::stopThread()
|
||||||
{
|
{
|
||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emu_thread = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmuApplication::unpause()
|
void EmuApplication::unpause()
|
||||||
|
|
|
@ -8,6 +8,8 @@ namespace fs = std::filesystem;
|
||||||
#include "EmuBinding.hpp"
|
#include "EmuBinding.hpp"
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QGuiApplication>
|
||||||
|
#include <QDir>
|
||||||
|
|
||||||
static const char *shortcut_names[] =
|
static const char *shortcut_names[] =
|
||||||
{
|
{
|
||||||
|
@ -142,6 +144,11 @@ std::string EmuConfig::findConfigDir()
|
||||||
char *dir;
|
char *dir;
|
||||||
fs::path path;
|
fs::path path;
|
||||||
|
|
||||||
|
auto app_dir_path = QGuiApplication::applicationDirPath();
|
||||||
|
auto config_file = QDir(app_dir_path).absoluteFilePath("snes9x.conf");
|
||||||
|
if (QFile::exists(config_file))
|
||||||
|
return app_dir_path.toStdString();
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if ((dir = getenv("XDG_CONFIG_HOME")))
|
if ((dir = getenv("XDG_CONFIG_HOME")))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue