ITotalJustice / notorious_beeg

gba emulator written in c++23
https://notorious-beeg.netlify.app/
GNU General Public License v3.0
41 stars 4 forks source link

[WEB] games don't run in opera browser #88

Closed ITotalJustice closed 2 years ago

ITotalJustice commented 2 years ago

this is due to the window never being in focus.

on startup:

SDL_WINDOWEVENT_FOCUS_GAINED
SDL_WINDOWEVENT_SHOWN
SDL_WINDOWEVENT_HIDDEN
SDL_WINDOWEVENT_FOCUS_GAINED
SDL_WINDOWEVENT_SHOWN

on opening the file browser:

SDL_WINDOWEVENT_FOCUS_LOST
SDL_WINDOWEVENT_HIDDEN

after selecting a file, closing the filebrowser

SDL_WINDOWEVENT_SHOWN

SDL_WINDOWEVENT_FOCUS_GAINED should be fired, although it is not. this is probably a bug in sdl2 or emsdk. either way, SDL_WINDOWEVENT_SHOWN can be used to the same effect.