diff --git a/src/config/config.cpp b/src/config/config.cpp index 189eac1..b765bc1 100644 --- a/src/config/config.cpp +++ b/src/config/config.cpp @@ -22,7 +22,7 @@ Config::Config(string filename) and this->jsonConfig["window"]["size"].asInt() == -1) { - this->sdlOption = SDL_WINDOW_FULLSCREEN_DESKTOP; + this->windowFlags = SDL_WINDOW_FULLSCREEN_DESKTOP; } else if(this->jsonConfig["window"]["size"].type() == Json::arrayValue and this->jsonConfig["window"]["size"].size() == 2 diff --git a/src/config/config.h b/src/config/config.h index 68ea0e1..f0c900c 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -16,7 +16,7 @@ class Config int genDefConf(); public: - int width = 0, height = 0, sdlOption = 0; + int width = 0, height = 0, windowFlags = 0; private: Json::Value jsonConfig; diff --git a/src/spirit.cpp b/src/spirit.cpp index e4d3d4c..1d93bcb 100644 --- a/src/spirit.cpp +++ b/src/spirit.cpp @@ -4,7 +4,7 @@ int main() { Config config("./config.json"); - Window window(config.width, config.height, config.sdlOption); + Window window(config.width, config.height, config.windowFlags); while(game(window) != Quit); } diff --git a/src/window/window.cpp b/src/window/window.cpp index b1b8032..1ddf1e8 100644 --- a/src/window/window.cpp +++ b/src/window/window.cpp @@ -1,6 +1,6 @@ #include "window.h" -Window::Window(int width, int height, int sdlOption) +Window::Window(int width, int height, int windowFlags) { if(SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO) < 0) { @@ -8,7 +8,7 @@ Window::Window(int width, int height, int sdlOption) this->quit(); } - this->window = SDL_CreateWindow("Spirit", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, sdlOption); + this->window = SDL_CreateWindow("Spirit", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, width, height, windowFlags); if(!(this->window)) { diff --git a/src/window/window.h b/src/window/window.h index d6403bb..9a91fb3 100644 --- a/src/window/window.h +++ b/src/window/window.h @@ -10,7 +10,7 @@ using namespace std; class Window { public: - Window(int width, int height, int sdlOption); + Window(int width, int height, int windowFlags); void clear(); void draw(); void update();