From aca2fd04b16b169889f223fd3ac7cce4b56ef8dc Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 25 Mar 2021 19:17:45 +0100 Subject: [PATCH 1/3] replace PREFIX/share/sameboy with DATA_DIR --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3d9b2cb9..c217102e 100644 --- a/Makefile +++ b/Makefile @@ -439,9 +439,9 @@ ICON_SIZES := 16x16 32x32 64x64 128x128 256x256 512x512 ICONS := $(foreach name,$(ICON_NAMES), $(foreach size,$(ICON_SIZES),$(DESTDIR)$(PREFIX)/share/icons/hicolor/$(size)/$(name).png)) install: sdl $(DESTDIR)$(PREFIX)/share/mime/packages/sameboy.xml $(ICONS) FreeDesktop/sameboy.desktop -@$(MKDIR) -p $(dir $(DESTDIR)$(PREFIX)) - mkdir -p $(DESTDIR)$(PREFIX)/share/sameboy/ $(DESTDIR)$(PREFIX)/bin/ - cp -rf $(BIN)/SDL/* $(DESTDIR)$(PREFIX)/share/sameboy/ - mv $(DESTDIR)$(PREFIX)/share/sameboy/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy + mkdir -p $(DESTDIR)$(DATA_DIR)/ $(DESTDIR)$(PREFIX)/bin/ + cp -rf $(BIN)/SDL/* $(DESTDIR)$(DATA_DIR)/ + mv $(DESTDIR)$(PREFIX)$(DATA_DIR)/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy ifeq ($(DESTDIR),) -update-mime-database -n $(PREFIX)/share/mime -xdg-desktop-menu install --novendor --mode system FreeDesktop/sameboy.desktop From 48ec3e6413bd0ad438971cd2a3c4a4177ed59720 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 30 Mar 2021 17:29:55 +0200 Subject: [PATCH 2/3] Correct usage of PREFIX with DATA_DIR slipped through in #370 DATA_DIR is not relative to PREFIX so having it is problematic --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c217102e..a7394289 100644 --- a/Makefile +++ b/Makefile @@ -441,7 +441,7 @@ install: sdl $(DESTDIR)$(PREFIX)/share/mime/packages/sameboy.xml $(ICONS) FreeDe -@$(MKDIR) -p $(dir $(DESTDIR)$(PREFIX)) mkdir -p $(DESTDIR)$(DATA_DIR)/ $(DESTDIR)$(PREFIX)/bin/ cp -rf $(BIN)/SDL/* $(DESTDIR)$(DATA_DIR)/ - mv $(DESTDIR)$(PREFIX)$(DATA_DIR)/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy + mv $(DESTDIR)$(DATA_DIR)/sameboy $(DESTDIR)$(PREFIX)/bin/sameboy ifeq ($(DESTDIR),) -update-mime-database -n $(PREFIX)/share/mime -xdg-desktop-menu install --novendor --mode system FreeDesktop/sameboy.desktop From 6b8eb8063a9685427f448a75a74967d89aaca73f Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 2 Apr 2021 02:54:14 +0300 Subject: [PATCH 3/3] Fix a bug where SameBoy would start in "faux turbo mode" --- Core/timing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/timing.c b/Core/timing.c index 18cf571c..1da82a38 100644 --- a/Core/timing.c +++ b/Core/timing.c @@ -69,7 +69,7 @@ void GB_timing_sync(GB_gameboy_t *gb) gb->last_sync += target_nanoseconds; } else { - if (-time_to_sleep < LCDC_PERIOD * 1200000000LL / GB_get_clock_rate(gb)) { + if (time_to_sleep < 0 && -time_to_sleep < LCDC_PERIOD * 1200000000LL / GB_get_clock_rate(gb)) { // We're running a bit too slow, but the difference is small enough, // just skip this sync and let it even out return;