mirror of
https://github.com/libretro/RetroArch.git
synced 2026-11-07 08:36:02 -10:00
The menu bar belongs to the windowed state. It was destroyed whenever the window went fullscreen, or was taken back from the last video driver, and a new one built - made from its template, every item put into the user's language - each time the window was windowed again: once for every return from fullscreen and for every driver restart. It is the same menu each time. It is now taken off the window and kept, and put back when the window is windowed again; a window that still has its menu keeps it. A new one is built only when there is none kept. One kept is dropped when the language changes (win32_menubar_rebuild()), so that the next windowed window gets one in the new language. Under Wine, retroarch.exe with OpenGL and the menu bar on, through four fullscreen toggles and a driver restart: the window had its menu bar each time it was windowed and none while fullscreen, and the menu was built once where it used to be built four times. samples/input/windows_wine_smoke holds the count in its two OpenGL scenarios. Not run on Windows; that the kept menu still answers a click was not tried.