[Ohrrpgce] SVN: teeemcee/13403 Add gfx_get_settings, gfx_set_settings. Implement in gfx_sdl/sdl2/fb.

subversion at HamsterRepublic.com subversion at HamsterRepublic.com
Fri Dec 15 02:03:09 PST 2023


teeemcee
2023-12-15 02:03:07 -0800 (Fri, 15 Dec 2023)
947
Add gfx_get_settings, gfx_set_settings. Implement in gfx_sdl/sdl2/fb.

Yet another way to get/set backend settings. Why I didn't use the others:
-adding new gfx.bi/h API calls: requires a lot of boilerplate and code bloat for
 each new setting
-using gfx_getwindowstate (adding more fields to WindowState): only for getting;
 and a lot of things arent really window state
-using gfx_setoption: only for setting; should just be used for commandline
 args, as converting to/from strings is a nuisance.
-using gfx_SendMessage: currently implemented by gfx_directx only and not used
 at all. This API is not a bad idea as it's infinitely flexible, but after
 trying to use it, it's very verbose. What's good is that it returns whether
 a setting is supported by the backend, but you can hackily do that indirectly
 with gfx_{get,set}_settings by initialising GfxSettings with invalid values
 and seeing what's overwritten. IMO not too hacky to be bad.
---
U   wip/allmodex.bas
U   wip/backends.bas
U   wip/gfx.bi
U   wip/gfx.h
U   wip/gfx_fb.bas
U   wip/gfx_sdl.bas
U   wip/gfx_sdl2.bas



More information about the Ohrrpgce mailing list