summaryrefslogtreecommitdiff
path: root/src/citra_qt/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/citra_qt/main.cpp')
-rw-r--r--src/citra_qt/main.cpp31
1 files changed, 25 insertions, 6 deletions
diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp
index bf010a2ba..144f11117 100644
--- a/src/citra_qt/main.cpp
+++ b/src/citra_qt/main.cpp
@@ -44,6 +44,7 @@
#include "core/settings.h"
#include "core/system.h"
#include "core/arm/disassembler/load_symbol_map.h"
+#include "core/gdbstub/gdbstub.h"
#include "core/loader/loader.h"
#include "video_core/video_core.h"
@@ -143,6 +144,11 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
game_list->LoadInterfaceLayout(settings);
+ ui.action_Use_Gdbstub->setChecked(Settings::values.use_gdbstub);
+ SetGdbstubEnabled(ui.action_Use_Gdbstub->isChecked());
+
+ GDBStub::SetServerPort(static_cast<u32>(Settings::values.gdbstub_port));
+
ui.action_Use_Hardware_Renderer->setChecked(Settings::values.use_hw_renderer);
SetHardwareRendererEnabled(ui.action_Use_Hardware_Renderer->isChecked());
@@ -175,6 +181,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
connect(ui.action_Stop, SIGNAL(triggered()), this, SLOT(OnStopGame()));
connect(ui.action_Use_Hardware_Renderer, SIGNAL(triggered(bool)), this, SLOT(SetHardwareRendererEnabled(bool)));
connect(ui.action_Use_Shader_JIT, SIGNAL(triggered(bool)), this, SLOT(SetShaderJITEnabled(bool)));
+ connect(ui.action_Use_Gdbstub, SIGNAL(triggered(bool)), this, SLOT(SetGdbstubEnabled(bool)));
connect(ui.action_Single_Window_Mode, SIGNAL(triggered(bool)), this, SLOT(ToggleWindowMode()));
connect(ui.action_Hotkeys, SIGNAL(triggered()), this, SLOT(OnOpenHotkeysDialog()));
@@ -201,7 +208,7 @@ GMainWindow::GMainWindow() : emu_thread(nullptr)
show();
- game_list->PopulateAsync(settings.value("gameListRootDir").toString(), settings.value("gameListDeepScan").toBool());
+ game_list->PopulateAsync(settings.value("gameListRootDir", ".").toString(), settings.value("gameListDeepScan", false).toBool());
QStringList args = QApplication::arguments();
if (args.length() >= 2) {
@@ -240,7 +247,7 @@ void GMainWindow::OnDisplayTitleBars(bool show)
}
void GMainWindow::BootGame(const std::string& filename) {
- LOG_INFO(Frontend, "Citra starting...\n");
+ LOG_INFO(Frontend, "Citra starting...");
// Shutdown previous session if the emu thread is still active...
if (emu_thread != nullptr)
@@ -355,7 +362,7 @@ void GMainWindow::UpdateRecentFiles() {
}
void GMainWindow::OnGameListLoadFile(QString game_path) {
- BootGame(game_path.toLatin1().data());
+ BootGame(game_path.toLocal8Bit().data());
}
void GMainWindow::OnMenuLoadFile() {
@@ -367,7 +374,7 @@ void GMainWindow::OnMenuLoadFile() {
settings.setValue("romsPath", QFileInfo(filename).path());
StoreRecentFile(filename);
- BootGame(filename.toLatin1().data());
+ BootGame(filename.toLocal8Bit().data());
}
}
@@ -379,7 +386,7 @@ void GMainWindow::OnMenuLoadSymbolMap() {
if (!filename.isEmpty()) {
settings.setValue("symbolsPath", QFileInfo(filename).path());
- LoadSymbolMap(filename.toLatin1().data());
+ LoadSymbolMap(filename.toLocal8Bit().data());
}
}
@@ -400,7 +407,7 @@ void GMainWindow::OnMenuRecentFile() {
QString filename = action->data().toString();
QFileInfo file_info(filename);
if (file_info.exists()) {
- BootGame(filename.toLatin1().data());
+ BootGame(filename.toLocal8Bit().data());
StoreRecentFile(filename); // Put the filename on top of the list
} else {
// Display an error message and remove the file from the list.
@@ -443,10 +450,22 @@ void GMainWindow::OnOpenHotkeysDialog() {
void GMainWindow::SetHardwareRendererEnabled(bool enabled) {
VideoCore::g_hw_renderer_enabled = enabled;
+
+ Config config;
+ Settings::values.use_hw_renderer = enabled;
+ config.Save();
+}
+
+void GMainWindow::SetGdbstubEnabled(bool enabled) {
+ GDBStub::ToggleServer(enabled);
}
void GMainWindow::SetShaderJITEnabled(bool enabled) {
VideoCore::g_shader_jit_enabled = enabled;
+
+ Config config;
+ Settings::values.use_shader_jit = enabled;
+ config.Save();
}
void GMainWindow::ToggleWindowMode() {