diff options
author | jacopograndi <jacopo.grandi@outlook.it> | 2022-01-04 18:36:24 +0100 |
---|---|---|
committer | jacopograndi <jacopo.grandi@outlook.it> | 2022-01-04 18:36:24 +0100 |
commit | 87fdac7918d776a4c11b3880eef64b09b334aa1c (patch) | |
tree | e75456587f3a5697d093240b739d8cc5c1025829 /graphics | |
parent | 9ab3c2b88edf48f6e215d940a43dc75fad7a977b (diff) |
linux build config and imgs
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/graphics.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
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 +}*/
|