This commit is contained in:
briaguya 2022-05-18 18:16:48 -04:00
commit 1946d0a9f0
2 changed files with 2 additions and 12 deletions

View file

@ -1,6 +1,4 @@
#include <stdio.h>
#include <iostream>
#if defined(ENABLE_OPENGL)
@ -96,7 +94,6 @@ const SDL_Scancode scancode_rmapping_nonextended[][2] = {
};
static void set_fullscreen(bool on, bool call_callback) {
std::cout << "\nwe hit set_fullscreen\n";
if (fullscreen_state == on) {
return;
}
@ -148,8 +145,6 @@ static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen, uint32
char title[512];
int len = sprintf(title, "%s (%s)", game_name, GFX_API_NAME);
std::cout << "\nwe hit gfx_sdl_init in gfx_sdl2.cpp\n";
window_width = width;
window_height = height;
wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,

View file

@ -268,19 +268,14 @@ namespace Ship {
dwWidth = Ship::stoi(Conf["WINDOW"]["FULLSCREEN WIDTH"], 1920);
dwHeight = Ship::stoi(Conf["WINDOW"]["FULLSCREEN HEIGHT"], 1080);
} else {
dwWidth = Ship::stoi(Conf["WINDOW"]["WINDOW WIDTH"], 320);
dwHeight = Ship::stoi(Conf["WINDOW"]["WINDOW HEIGHT"], 240);
dwWidth = Ship::stoi(Conf["WINDOW"]["WINDOW WIDTH"], 640);
dwHeight = Ship::stoi(Conf["WINDOW"]["WINDOW HEIGHT"], 480);
}
dwMenubar = Ship::stoi(Conf["WINDOW"]["menubar"], 0);
const std::string& gfx_backend = Conf["WINDOW"]["GFX BACKEND"];
SetWindowManager(&WmApi, &RenderingApi, gfx_backend);
std::cout << "\nwe're about to call gfx_init from Window.cpp Init\n";
gfx_init(WmApi, RenderingApi, GetContext()->GetName().c_str(), bIsFullscreen, dwWidth, dwHeight);
std::cout << "\nwe're back after calling gfx_init from Window.cpp Init\n";
WmApi->set_fullscreen_changed_callback(Window::OnFullscreenChanged);
WmApi->set_keyboard_callbacks(Window::KeyDown, Window::KeyUp, Window::AllKeysUp);
}