From 87fdac7918d776a4c11b3880eef64b09b334aa1c Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Tue, 4 Jan 2022 18:36:24 +0100 Subject: linux build config and imgs --- graphics/graphics.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'graphics') diff --git a/graphics/graphics.cpp b/graphics/graphics.cpp index 823668a..729c31b 100644 --- a/graphics/graphics.cpp +++ b/graphics/graphics.cpp @@ -656,17 +656,21 @@ void Graphics::render (Gst &gst, View &view) Graphics_sdl::Graphics_sdl (int resx, int resy) { SDL_Init(SDL_INIT_VIDEO); - + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "0"); window = SDL_CreateWindow("age", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, resx, resy, SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE); - screenSurface = SDL_GetWindowSurface(window); + if (window == nullptr) { + std::cerr << "SDL_CreateWindow Error: " << SDL_GetError() << std::endl; + } + + //screenSurface = SDL_GetWindowSurface(window); rend = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); SDL_SetRenderDrawBlendMode(rend, SDL_BLENDMODE_BLEND); - + load_sheet(); txt.gRenderer = rend; @@ -791,4 +795,4 @@ void render_text_scaled (SDL_Renderer* rend, char str[], SDL_RenderCopy(rend, t->tex, &srcRect, &dstRect); width += t->cw[char_i]*scale+1*scale; } -}*/ \ No newline at end of file +}*/ -- cgit v1.2.3-54-g00ecf