VOGONS


Double Buffering (GP2X)

Topic actions

Reply 20 of 23, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

yeah that is pretty easy. The faster refered to faster in execution speed. not coding speed.

the function DrawText in src/gui/sdl_mapper.cpp draws text on surface using the int10 font.

Water flows down the stream
How to ask questions the smart way!

Reply 22 of 23, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That int10 thing is not complex, it's just a raster font (see void DrawText()
in sdl_mapper.cpp for how it's used as Qbix said).
But don't bother too much with it, the functionality should be swappable at
any point if needed.

Reply 23 of 23, by Pickle

User metadata
Rank Member
Rank
Member

Well overall the idea is working. Heres a summary:

Normal mode dosbox works as normal only using the sdl.surface.
When an OSD is turned on the sdl.surface is copied to sdl.blit.surface and all updates are then made to sdl.blit.surface. I then blit sdl.blit.surface and then my OSD to sdl.surface.
If all the OSD's are turned off I copy sdl.blit.surface back to sdl.surface and dosbox runs as normal.

There is some very minor flicker but its basically the lcd having time to update bewtween the sdl.blit.surface blit and the osd blit.
But the good thing is that the OSD can be turned off and on with no ghosting occuring.

Since then ive also added a virtual keyaboard using sdl ttf, which acts as an osd.
I hope to release everything this weekend.