bsnes-libretro/bsnes/target-bsnes
Tim Allen 0dcbe627c2 target-bsnes: Do not set the window background to black.
To resize a window on X11, the window manager tells the X11 server to change the
window size, then the X11 server tells the application to paint itself, and then
(eventually) the application tells the X11 server what to draw. This adds an
arbitrary amount of latency to resizing, so to make things feel more responsive,
the X11 server will paint any newly-exposed parts of the window with a default
background colour. If it happens to be the same colour as the appplication would
paint anyway, this gives resizing a much better user-experience.

Since most of bsnes' window is occupied by the viewport, which is always black,
bsnes accordingly set its window background colour to black for the best
resizing experience. However, this had two additional effects:

  - When no game is loaded, bsnes displays the bsnes icon in the main display
    area. Black canvas widgets are used as spacers to position the icon
    correctly, but the spacers don't cover the entire background, and the window
    background shines through.
  - GTK+3 draws widget transparent by default, so the background colour of the
    parent widget shines through child widgets. In particular, setting the
    window background to black makes the menu background black, even if the menu
    text is also a dark colour.

In order to get the menu to display properly in GTK+3 builds, we have to stop
bsnes from setting the top-level window background colour, and we also have to
ensure that the spacer widgets around the icon cover the entire surface of the
window.

Fixes #108.
2021-01-08 23:00:39 +11:00
..
input Add 'Unload Game' hotkey 2020-09-22 23:43:01 +10:00
presentation target-bsnes: Do not set the window background to black. 2021-01-08 23:00:39 +11:00
program target-bsnes: Only suppress screensavers when active 2020-11-09 20:25:35 +11:00
resource Fix EXHIROM-RAM-* board mappings. 2020-11-06 15:04:28 +11:00
settings target-bsnes: Fixes for a couple of input settings bugs. 2020-11-11 14:48:32 +11:00
tools Strip whitespace and empty lines from the cheat editor. 2020-10-21 16:39:39 +11:00
bsnes.cpp target-bsnes: Only suppress screensavers when active 2020-11-09 20:25:35 +11:00
bsnes.hpp v108.1 2019-07-31 06:57:31 +09:00
GNUmakefile Missing install and uninstall steps 2020-11-10 22:13:16 +11:00
README.md Add some documentation about what's in various bsnes directories. 2020-11-07 23:43:38 +11:00

bsnes user interface

This directory contains the code for the normal bsnes user interface.

  • bsnes.cpp contains the nall::main() entry point
  • input contains the glue logic that maps incoming controller inputs into emulated controller inputs and hotkey signals
  • presentation contains the code that sets up the main window (menu bar, status bar, etc.)
  • program contains the glue logic that connects the UI to the emulation core, generating manifests, loading games, displaying video and playing audio, etc.
  • resource contains all the data bsnes uses at runtime, like icons, the about box logos, the SNES board database
  • settings contains Settings window stuff
  • tools contains Tools window stuff