Code review comment for lp:~widelands-dev/widelands/bug-1741779-map-description-edit-cutoff

Revision history for this message
Notabilis (notabilis27) wrote :

Okay, thanks. I think I finally understand what is happening on my system.
Regarding the primary bug, I am unfortunately unable to reproduce it on my system. But the code is looking okay and if it fixes the bug for you, that is enough testing for me.

Are you by chance testing in release mode? Or has your system only limited texture memory? My RT::TextureTooBig exception is not triggered in release mode since another restriction is used there. My exception is triggered due to graphic/text/rt_render.cc:266 where different values for debug and release are used. When using the release version your restrictions work fine. The problem in debug mode is that the exception uses the smaller (hardcoded) value while your checks are using the real (hardware) value which is seemingly bigger on my system. Maybe we should move the restriction from rt_render.cc:266 into graphic/graphic.cc:91 ? (If you do: render_text.cc:183 can then be cleaned up, too.) Except for the text rendering no-one seems to care about the maximum texture size so moving this should be safe.

I added some questions regarding int-casting in the diff, but they haven't been introduced by your changes and someone probably had a reasons for the casts.

« Back to merge proposal