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 <sys/time.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <string.h>
|
||||||
#include "gb.h"
|
#include "gb.h"
|
||||||
#include "display.h"
|
#include "display.h"
|
||||||
|
|
||||||
@ -197,6 +198,11 @@ void display_vblank(GB_gameboy_t *gb)
|
|||||||
frames++;
|
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);
|
gb->vblank_callback(gb);
|
||||||
if (!gb->turbo) {
|
if (!gb->turbo) {
|
||||||
struct timeval now;
|
struct timeval now;
|
||||||
|
Loading…
Reference in New Issue
Block a user