mirror of https://github.com/bsnes-emu/bsnes.git
Vblank now returns a white screen if LCD is off, instead of keeping the buffer unmodified.
This commit is contained in:
parent
e822f17bb7
commit
3344480de7
|
@ -3,6 +3,7 @@
|
|||
#include <sys/time.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "gb.h"
|
||||
#include "display.h"
|
||||
|
||||
|
@ -197,6 +198,11 @@ void display_vblank(GB_gameboy_t *gb)
|
|||
frames++;
|
||||
*/
|
||||
|
||||
if (!(gb->io_registers[GB_IO_LCDC] & 0x80)) {
|
||||
/* LCD is off, memset screen to white */
|
||||
memset(gb->screen, 0xFF, 160 * 144 * 4);
|
||||
}
|
||||
|
||||
gb->vblank_callback(gb);
|
||||
if (!gb->turbo) {
|
||||
struct timeval now;
|
||||
|
|
Loading…
Reference in New Issue