Some test inputs and commentarys

This commit is contained in:
Julian Nießner
2018-05-25 12:13:06 +02:00
parent 3169790299
commit ae5fa3f2aa
14 changed files with 108 additions and 33 deletions

View File

@@ -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);