jc-SpaceXp / cNES

NES emulator written in C and targeted for Linux.
zlib License
6 stars 4 forks source link

Add support for multiple windows (in SDL2 related functions) #5

Closed jc-SpaceXp closed 1 year ago

jc-SpaceXp commented 1 year ago

Recent nametable viewer/debugger has been developed but I would like the ability for cNES to display the main window and the nametable viewer at the same time. This requires multiple windows to be supported.

jc-SpaceXp commented 1 year ago

My SDL code is quite old and has mostly remained untouched for most of this project.

Going to do some better research into SDL and see what improvements can be made whilst trying to add support for multiple windows.

jc-SpaceXp commented 1 year ago

Better error handling: 02837ddb5fec71c2abe5d1e25b08ab872f876b55

jc-SpaceXp commented 1 year ago

Minor refactor for SDL2 struct name (Display to Sdl2Display): 67a9af1edbaba420351239454aa08a139e865fd6

jc-SpaceXp commented 1 year ago

Personally I dislike the way I'm handling the initialisations of structs. This was one of the first opportunities I had at implementing a different solution.

The solution being a separate allocator and initialiser: 2393909cc6b51aa07a6f35c175cbdf4792e529cc

(I like this change and it will probably be implemented for every other init function, after some more pressing issues are dealt with first)

jc-SpaceXp commented 1 year ago

More generic SDL functions: 855add271fda8f8771f380c42beaa042606f3513

Needed so these functions can support both the main cNES output and the nametable viewers one too.

jc-SpaceXp commented 1 year ago

Debug builds now support multiple windows: 12457aa82e7c7cfaec1e9fe5eb821935270a05a0

This commit resolves this issue.