mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 14:23:44 -07:00
cleanup
This commit is contained in:
parent
a73e3c38c8
commit
1946d0a9f0
2 changed files with 2 additions and 12 deletions
|
@ -1,6 +1,4 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(ENABLE_OPENGL)
|
#if defined(ENABLE_OPENGL)
|
||||||
|
|
||||||
|
@ -96,7 +94,6 @@ const SDL_Scancode scancode_rmapping_nonextended[][2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void set_fullscreen(bool on, bool call_callback) {
|
static void set_fullscreen(bool on, bool call_callback) {
|
||||||
std::cout << "\nwe hit set_fullscreen\n";
|
|
||||||
if (fullscreen_state == on) {
|
if (fullscreen_state == on) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -148,8 +145,6 @@ static void gfx_sdl_init(const char *game_name, bool start_in_fullscreen, uint32
|
||||||
char title[512];
|
char title[512];
|
||||||
int len = sprintf(title, "%s (%s)", game_name, GFX_API_NAME);
|
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_width = width;
|
||||||
window_height = height;
|
window_height = height;
|
||||||
wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
wnd = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
|
||||||
|
|
|
@ -268,19 +268,14 @@ namespace Ship {
|
||||||
dwWidth = Ship::stoi(Conf["WINDOW"]["FULLSCREEN WIDTH"], 1920);
|
dwWidth = Ship::stoi(Conf["WINDOW"]["FULLSCREEN WIDTH"], 1920);
|
||||||
dwHeight = Ship::stoi(Conf["WINDOW"]["FULLSCREEN HEIGHT"], 1080);
|
dwHeight = Ship::stoi(Conf["WINDOW"]["FULLSCREEN HEIGHT"], 1080);
|
||||||
} else {
|
} else {
|
||||||
dwWidth = Ship::stoi(Conf["WINDOW"]["WINDOW WIDTH"], 320);
|
dwWidth = Ship::stoi(Conf["WINDOW"]["WINDOW WIDTH"], 640);
|
||||||
dwHeight = Ship::stoi(Conf["WINDOW"]["WINDOW HEIGHT"], 240);
|
dwHeight = Ship::stoi(Conf["WINDOW"]["WINDOW HEIGHT"], 480);
|
||||||
}
|
}
|
||||||
dwMenubar = Ship::stoi(Conf["WINDOW"]["menubar"], 0);
|
dwMenubar = Ship::stoi(Conf["WINDOW"]["menubar"], 0);
|
||||||
const std::string& gfx_backend = Conf["WINDOW"]["GFX BACKEND"];
|
const std::string& gfx_backend = Conf["WINDOW"]["GFX BACKEND"];
|
||||||
SetWindowManager(&WmApi, &RenderingApi, 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);
|
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_fullscreen_changed_callback(Window::OnFullscreenChanged);
|
||||||
WmApi->set_keyboard_callbacks(Window::KeyDown, Window::KeyUp, Window::AllKeysUp);
|
WmApi->set_keyboard_callbacks(Window::KeyDown, Window::KeyUp, Window::AllKeysUp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue