Re: [hatari-devel] Hatari screen dialog regression

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


> Am 13.08.2025 um 21:25 schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
> 
> 
>> Am 13.08.2025 um 21:21 schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
>> 
>> Hi Andreas,
>> 
>> On 13.8.2025 7.02, Andreas Grabher wrote:
>>>>>> Am 13.08.2025 um 02:12 schrieb Eero Tamminen <oak@xxxxxxxxxxxxxx>:
>>>>> There has already been a window size check in SDLGui_DoDialogExt():
>>>>> if (pSdlGuiScrn->h / sdlgui_fontheight < dlg[0].h)
>>>>> {
>>>>>   Log_Printf(LOG_ERROR, "Screen size too small for dialog!\n");
>>>>>   return SDLGUI_ERROR;
>>>>> }
>>>>> Why are we adding another (portability breaking) check?
>>> 
>>> To verify that dialog works also with users' configurations...
>>> 
>>> The existing one works and is portable by using the actual window size instead of hard coding some values.
>> 
>> ...not just with your current configuration.
>> 
>> It's clearly needed because all 3 of us Hatari developers got it wrong and merged broken code twice (after testing).
>> 
>> Doesn't Previous have user configuration options that affect its window size?
>> 
> It has not. If it had I would test my code with the smallest possible window size. This is not a runtime issue but a coding issue.
> 
If this is really needed it would be a bit less ugly to use assert() instead of comparing hard coded values at runtime on user’s machines. The result will always be the same.

>>   - Eero
>> 
>> 
>> 
> 
> 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/