ghaerr / microwindows

The Nano-X Window System
Other
648 stars 92 forks source link

Adjust the signatures of some stubs #72

Closed nwrkbiz closed 1 year ago

nwrkbiz commented 1 year ago

Adjust the signatures of some stubs

nwrkbiz commented 1 year ago

Helps to overcome some crashes with emscripten + fltk

ghaerr commented 1 year ago

Hello @nwrkbiz,

This is pretty cool! What version of FLTK are you using for the browser and emscripten? You'll have to post some screenshots :)

Let me know when you're ready for commit.

Thank you!

nwrkbiz commented 1 year ago

Hi,

I just managed to get the draw x example from erco to work and I am quite convinced, that all FLTK will work:

image

The FLTK version I use is 1.3.8 and I needed to apply the XRANDR patch.

For emscripten I use 3.1.31 and for llvm I use the non released 17-init tag.

However I needed to change the SDL2 driver to use the SDL_CreateWindowAndRenderer function rather than creating the window and the renderer one after another. I do not know why and am investigating this now.

The main blocker were really just the mismatching stub signatures, as they caused a crash (:

Best regards!

EDIT: I found the problem, SDL_WINDOW_RESIZABLE needs to be handeled differently in emscripten, thus I will disable it for emscripten.

nwrkbiz commented 1 year ago

Finished now fltk works.

Here some more examples: image image

ghaerr commented 1 year ago

Thanks for the fixes and screenshots!