mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-23 06:34:15 -04:00
This reverts commit e10e1f74d5.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# IDE folders
|
||||
.idea/
|
||||
.vs/
|
||||
.zed/
|
||||
|
||||
# Caches
|
||||
__pycache__
|
||||
|
||||
@@ -72,10 +72,6 @@ struct UserSettings {
|
||||
ConfigVar<bool> lockAspectRatio;
|
||||
ConfigVar<bool> enableFpsOverlay;
|
||||
ConfigVar<int> fpsOverlayCorner;
|
||||
ConfigVar<int> windowPositionX;
|
||||
ConfigVar<int> windowPositionY;
|
||||
ConfigVar<int> windowWidth;
|
||||
ConfigVar<int> windowHeight;
|
||||
} video;
|
||||
|
||||
struct {
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
#include "dusk/settings.h"
|
||||
#include "dusk/config.hpp"
|
||||
#include "dusk/dusk.h"
|
||||
|
||||
#include <SDL3/SDL_video.h>
|
||||
|
||||
namespace dusk {
|
||||
|
||||
@@ -13,10 +10,6 @@ UserSettings g_userSettings = {
|
||||
.lockAspectRatio {"video.lockAspectRatio", false},
|
||||
.enableFpsOverlay {"game.enableFpsOverlay", false},
|
||||
.fpsOverlayCorner {"game.fpsOverlayCorner", 0},
|
||||
.windowPositionX {"video.windowPositionX", SDL_WINDOWPOS_UNDEFINED},
|
||||
.windowPositionY {"video.windowPositionY", SDL_WINDOWPOS_UNDEFINED},
|
||||
.windowWidth {"video.windowWidth", defaultWindowWidth * 2},
|
||||
.windowHeight {"video.windowHeight", defaultWindowHeight * 2},
|
||||
},
|
||||
|
||||
.audio = {
|
||||
@@ -185,10 +178,6 @@ void registerSettings() {
|
||||
Register(g_userSettings.video.lockAspectRatio);
|
||||
Register(g_userSettings.video.enableFpsOverlay);
|
||||
Register(g_userSettings.video.fpsOverlayCorner);
|
||||
Register(g_userSettings.video.windowPositionX);
|
||||
Register(g_userSettings.video.windowPositionY);
|
||||
Register(g_userSettings.video.windowWidth);
|
||||
Register(g_userSettings.video.windowHeight);
|
||||
|
||||
// Audio
|
||||
Register(g_userSettings.audio.masterVolume);
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
#include <ranges>
|
||||
|
||||
#include "aurora/lib/window.hpp"
|
||||
#include "dusk/dusk.h"
|
||||
#include "dusk/io.hpp"
|
||||
#include "dusk/config.hpp"
|
||||
#include "input.hpp"
|
||||
#include "prelaunch.hpp"
|
||||
#include "window.hpp"
|
||||
@@ -171,18 +169,6 @@ void handle_event(const SDL_Event& event) noexcept {
|
||||
});
|
||||
}
|
||||
sConnectedGamepads.erase(event.gdevice.which);
|
||||
} else if (event.type == SDL_EVENT_WINDOW_MOVED || event.type == SDL_EVENT_WINDOW_RESIZED) {
|
||||
int x, y;
|
||||
if (SDL_GetWindowPosition(aurora::window::get_sdl_window(), &x, &y)) {
|
||||
getSettings().video.windowPositionX.setValue(x);
|
||||
getSettings().video.windowPositionY.setValue(y);
|
||||
}
|
||||
int width, height;
|
||||
if (SDL_GetWindowSize(aurora::window::get_sdl_window(), &width, &height)) {
|
||||
getSettings().video.windowWidth.setValue(width);
|
||||
getSettings().video.windowHeight.setValue(height);
|
||||
}
|
||||
config::Save();
|
||||
}
|
||||
input::handle_event(event);
|
||||
}
|
||||
|
||||
@@ -551,10 +551,10 @@ int game_main(int argc, char* argv[]) {
|
||||
config.cachePath = reinterpret_cast<const char*>(cachePathString.c_str());
|
||||
config.vsync = dusk::getSettings().video.enableVsync;
|
||||
config.startFullscreen = dusk::getSettings().video.enableFullscreen;
|
||||
config.windowPosX = dusk::getSettings().video.windowPositionX;
|
||||
config.windowPosY = dusk::getSettings().video.windowPositionY;
|
||||
config.windowWidth = dusk::getSettings().video.windowWidth;
|
||||
config.windowHeight = dusk::getSettings().video.windowHeight;
|
||||
config.windowPosX = -1;
|
||||
config.windowPosY = -1;
|
||||
config.windowWidth = defaultWindowWidth * 2;
|
||||
config.windowHeight = defaultWindowHeight * 2;
|
||||
config.desiredBackend = ResolveDesiredBackend(parsed_arg_options);
|
||||
config.logCallback = &aurora_log_callback;
|
||||
config.logLevel = startupLogLevel;
|
||||
|
||||
Reference in New Issue
Block a user