Re: [hatari-devel] Hatari screen dialog regression |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Hatari screen dialog regression
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Wed, 13 Aug 2025 21:31:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; bh=SY+MAKtTDFX9QBebKlhthtfefLwbG/WW2jgrFETk5Hc=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To:x-icloud-hme; b=Uzuah1z2rLQ3CwUSuqzSPnRmNdeHwA3lBQiUGzgH9NSYfUSQS2cxwHKKNNbDT5OnTXxJ4Eoj76otvmWpizO+YiKaecXvm+14BcVKw396zWp0eN9Q0JeZEZU+fn3ap4jmx6XxhzuMWJzCl0MFCvu1hryNSLBvvvNmArR/ut9ILWvqeDStktXedDa5y9WO2YZezgvTaW0fUZRiBkOpAZMFhgan29fq2vgdKnq77CjMkISIZMFve1U+Xyd8V2AsmRok14JeIKBTWvk5HC5m4jrUGm64MRxha4im6LZIrPFBqOE6WLByNrHVYCeGHChHR+7HdBHVYtmzsQRWmChojtcROw==
> 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
>>
>>
>>
>
>