button to restore default window size and position (#234)

This commit is contained in:
bdamja
2026-04-05 12:31:28 -06:00
parent 9a27718808
commit 1430f690e0
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -11,6 +11,7 @@
#include "dusk/hotkeys.h"
#include "dusk/settings.h"
#include "m_Do/m_Do_controller_pad.h"
#include "m_Do/m_Do_graphic.h"
namespace dusk {
ImGuiMenuGame::ImGuiMenuGame() {}
@@ -29,6 +30,13 @@ namespace dusk {
VISetWindowFullscreen(getSettings().video.enableFullscreen);
}
if (ImGui::MenuItem("Default Window Size")) {
getSettings().video.enableFullscreen = false;
VISetWindowFullscreen(false);
VISetWindowSize(FB_WIDTH * 2, FB_HEIGHT * 2);
VICenterWindow();
}
ImGui::EndMenu();
}
+2 -2
View File
@@ -269,8 +269,8 @@ int game_main(int argc, char* argv[]) {
config.appName = "Dusk";
config.windowPosX = -1;
config.windowPosY = -1;
config.windowWidth = 608 * 2;
config.windowHeight = 448 * 2;
config.windowWidth = FB_WIDTH * 2;
config.windowHeight = FB_HEIGHT * 2;
config.desiredBackend = ParseAuroraBackend(parsed_arg_options["backend"].as<std::string>());
config.logCallback = &aurora_log_callback;
config.logLevel = (AuroraLogLevel)parsed_arg_options["log-level"].as<uint8_t>();