Qt: Portable mode. Fix hang on close.

This commit is contained in:
BearOso 2023-08-07 18:51:16 -05:00
parent 2e3d5e1102
commit c8b21fa461
6 changed files with 17 additions and 2 deletions

@ -1 +1 @@
Subproject commit 197a273fd494321157f40a962c51b5fa8c9c3581
Subproject commit 4e2fdb25671c742a9fbe93a6034eb1542244c7e1

2
external/glslang vendored

@ -1 +1 @@
Subproject commit 9c7fd1a33e5cecbe465e1cd70170167d5e40d398
Subproject commit 3ebb72cc7429f0ab8218104dc3687c659c0f364d

View File

@ -297,6 +297,7 @@ void S9xImGuiInit(S9xImGuiInitInfo *init_info)
}
ImGui::CreateContext();
ImGui::GetIO().IniFilename = nullptr;
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NoMouse;
ImGui::StyleColorsLight();
ImFontGlyphRangesBuilder builder;

View File

@ -11,6 +11,11 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC 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(SNES9X_CORE_SOURCES
../fxinst.cpp

View File

@ -215,6 +215,8 @@ void EmuApplication::stopThread()
{
std::this_thread::yield();
}
emu_thread = nullptr;
}
void EmuApplication::unpause()

View File

@ -8,6 +8,8 @@ namespace fs = std::filesystem;
#include "EmuBinding.hpp"
#include <functional>
#include <QSettings>
#include <QGuiApplication>
#include <QDir>
static const char *shortcut_names[] =
{
@ -142,6 +144,11 @@ std::string EmuConfig::findConfigDir()
char *dir;
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
if ((dir = getenv("XDG_CONFIG_HOME")))
{