diff --git a/src/Window.cpp b/src/Window.cpp index 9447945..eede1b7 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -118,7 +118,7 @@ void Window::update() { void Window::show_image(const Image& image) { // create texture from surface _t.reset(SDL_CreateTextureFromSurface(_r.get(), image.surface())); - +/* // get screen size, to scale down if image is too big int w {image.width()}; int h {image.height()}; @@ -136,7 +136,12 @@ void Window::show_image(const Image& image) { h = static_cast(round(w / image_ratio)); } } - set_size(w, h); + int ww, wh; + SDL_GetWindowSize(_w.get(), &ww, &wh); + if (ww != w || wh != h) { + set_size(w, h); + } + */ } void Window::add_event_handler(WindowEventHandler handler, SDL_WindowEventID type) {