bsnes/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
..
Database Add games Bahamut Lagoon and Tales of Phantasia. 2020-09-28 18:59:20 +10:00
Locale Update to bsnes v107r4 beta release. 2019-07-07 19:44:09 +10:00
emulator Use byuu.org/bsnes as the official homepage. 2020-10-27 23:21:19 +11:00
filter v107.8 2019-07-17 21:11:46 +09:00
gb Apply bsnes' customisations back on top of the upstream SameBoy source. 2020-10-12 18:40:44 +11:00
heuristics v114.5 2020-02-23 20:23:25 +09:00
lzma Update to bsnes v107r4 beta release. 2019-07-07 19:44:09 +10:00
obj Update to bsnes v107r2 beta release. 2019-04-18 17:27:44 +10:00
out Apparently the MinGW compiler automatically appends the .exe extension now. 2020-06-09 06:02:16 +10:00
processor v114 2020-01-08 18:46:53 +09:00
sfc sfc: Report auto joypad polling in the HVBJOY register. 2020-11-11 14:49:05 +11:00
target-bsnes target-bsnes: Do not set the window background to black. 2021-01-08 23:00:39 +11:00
target-libretro Fix EXHIROM-RAM-* board mappings. 2020-11-06 15:04:28 +11:00
GNUmakefile v111.8 2019-10-16 16:12:28 +09:00
README.md Add some documentation about what's in various bsnes directories. 2020-11-07 23:43:38 +11:00

README.md

bsnes source code

A guide to what all these directories are for:

  • Database contains the databases bsnes uses to figure out what circuit board a game expects, and also the database of pre-made game cheats
  • emulator contains the interface that the emulation core in sfc implements
    • It comes from higan v106, which has many emulation cores that all implement the same interface — bsnes only has one, but the interface is still a good abstraction, so it's still here.
  • filter contains classic CPU-based image upscaling filters, like HQ2x and Super Eagle
  • gb contains the SameBoy emulator code used for Super Game Boy emulation
  • heuristics contains the logic that guesses which memory map a particular game expects and what extra hardware it assumes is present, when a game cannot be found in the database
  • Locale contains translation databases that bsnes can use to display its user interface in a different language
  • lzma contains the 7-Zip SDK allowing bsnes to understad .7z archives
  • processor contains all the CPU emulation cores used by the hardware bsnes emulates
    • Another holdover from higan v106, where different supported systems happen to use the same model CPU, so the CPU emulation cores are not specific to a system
  • sfc contains Super Famicom (SNES) emulation code
  • target-bsnes contains the normal bsnes user interface
  • target-libretro implements the "libretro" API on top of bsnes' native emulator API, so bsnes can be used with libretro-based frontends