Some test inputs and commentarys
This commit is contained in:
@@ -49,6 +49,8 @@ namespace Game {
|
||||
}
|
||||
|
||||
bool initSDL() {
|
||||
int result = SetProcessDPIAware(); // NEEDED or SDL_GetDisplayDPI returns wrong numbers
|
||||
cout << "Result: " << result << endl;
|
||||
//Init SDL
|
||||
if(SDL_Init(SDL_INIT_VIDEO) < 0 ) {
|
||||
cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << endl;
|
||||
@@ -62,7 +64,10 @@ bool initSDL() {
|
||||
return false;
|
||||
}
|
||||
//Read in Display DPI
|
||||
SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(gWindow),&Game::DDPI,&Game::HDPI,&Game::VDPI);
|
||||
int returnDisplayDPI = SDL_GetDisplayDPI(SDL_GetWindowDisplayIndex(gWindow),&Game::DDPI,&Game::HDPI,&Game::VDPI);
|
||||
if(returnDisplayDPI != 0) {
|
||||
cout << "DisplayDPI cannot be loaded! SDL_ERROR: " << SDL_GetError() << endl;
|
||||
}
|
||||
cout << "DPI: DDPI: " << Game::DDPI << " HDPI: " << Game::HDPI << " VPDI: " << Game::VDPI << endl;
|
||||
//Mask deprectated functions
|
||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||
|
||||
Reference in New Issue
Block a user