From 9d8dc58b19d387edf7e77491358e4638599db011 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Thu, 28 Sep 2017 23:56:40 +0200 Subject: [PATCH] -Fixed RASPBERRY not being renamed to AMIBERRY on some places -Updated the project to include a DEBUG pre-launch option, so we don't have to change the Makefile every time -Updated the Makefile to comment out DEBUG --- Makefile | 2 +- VSLinux/Amiberry.vcxproj.user | 6 +-- src/cfgfile.cpp | 2 +- src/drawing.cpp | 2 +- src/fsdb_unix.cpp | 2 +- src/osdep/amiberry_gfx.cpp | 73 +++++++++++++++++------------------ src/osdep/picasso96.cpp | 2 +- 7 files changed, 43 insertions(+), 46 deletions(-) diff --git a/Makefile b/Makefile index ebdf9efc..48c94568 100644 --- a/Makefile +++ b/Makefile @@ -39,7 +39,7 @@ all: guisan $(PROG) guisan: $(MAKE) -C src/guisan -DEBUG=1 +#DEBUG=1 SDL_CFLAGS = `sdl2-config --cflags --libs` diff --git a/VSLinux/Amiberry.vcxproj.user b/VSLinux/Amiberry.vcxproj.user index ea71f9a1..9c9299c9 100644 --- a/VSLinux/Amiberry.vcxproj.user +++ b/VSLinux/Amiberry.vcxproj.user @@ -4,14 +4,12 @@ projects/amiberry/amiberry-sdl2-dev projects/amiberry LinuxDebugger - - + export DEBUG=1 projects/amiberry/amiberry-sdl2-dev projects/amiberry LinuxDebugger - - + export DEBUG=0 \ No newline at end of file diff --git a/src/cfgfile.cpp b/src/cfgfile.cpp index 36a3a4be..b987a0fd 100644 --- a/src/cfgfile.cpp +++ b/src/cfgfile.cpp @@ -4408,7 +4408,7 @@ void default_prefs(struct uae_prefs *p, bool reset, int type) p->gfx_framerate = 0; -#ifdef RASPBERRY +#ifdef AMIBERRY p->gfx_size.width = 640; p->gfx_size.height = 256; p->gfx_resolution = RES_HIRES; diff --git a/src/drawing.cpp b/src/drawing.cpp index 4d4bdaef..e206d8eb 100644 --- a/src/drawing.cpp +++ b/src/drawing.cpp @@ -2205,7 +2205,7 @@ static void center_image(void) linetoscr_x_adjust_pixbytes = linetoscr_x_adjust_pixels * gfxvidinfo.drawbuffer.pixbytes; thisframe_y_adjust_real = minfirstline; - max_ypos_thisframe = (maxvpos_display - minfirstline); + max_ypos_thisframe = maxvpos_display - minfirstline + 1; } static void init_drawing_frame(void) diff --git a/src/fsdb_unix.cpp b/src/fsdb_unix.cpp index 1f4a4412..be84a75a 100644 --- a/src/fsdb_unix.cpp +++ b/src/fsdb_unix.cpp @@ -85,7 +85,7 @@ int fsdb_fill_file_attrs (a_inode *base, a_inode *aino) | (S_IWUSR & statbuf.st_mode ? 0 : A_FIBF_WRITE) | (S_IRUSR & statbuf.st_mode ? 0 : A_FIBF_READ)); -#if defined(WIN32) || defined(ANDROIDSDL) || defined(RASPBERRY) +#if defined(WIN32) || defined(ANDROIDSDL) || defined(AMIBERRY) // Always give execute & read permission // Temporary do this for raspberry... aino->amigaos_mode &= ~A_FIBF_EXECUTE; diff --git a/src/osdep/amiberry_gfx.cpp b/src/osdep/amiberry_gfx.cpp index eda5671b..6506c2ad 100644 --- a/src/osdep/amiberry_gfx.cpp +++ b/src/osdep/amiberry_gfx.cpp @@ -226,7 +226,7 @@ int lockscr() { if(SDL_LockSurface(screen)== -1) return 0; - //init_row_map(); + init_row_map(); return 1; } @@ -516,42 +516,41 @@ static int save_thumb(char* path) bool vsync_switchmode(int hz) { - // int changed_height = changed_prefs.gfx_size.height; - // - // if (hz >= 55) - // hz = 60; - // else - // hz = 50; - // - // if(hz == 50 && currVSyncRate == 60) - // { - // // Switch from NTSC -> PAL - // switch(changed_height) { - // case 200: changed_height = 240; break; - // case 216: changed_height = 262; break; - // case 240: changed_height = 270; break; - // case 256: changed_height = 270; break; - // case 262: changed_height = 270; break; - // case 270: changed_height = 270; break; - // } - // } - // else if(hz == 60 && currVSyncRate == 50) - // { - // // Switch from PAL -> NTSC - // switch(changed_height) { - // case 200: changed_height = 200; break; - // case 216: changed_height = 200; break; - // case 240: changed_height = 200; break; - // case 256: changed_height = 216; break; - // case 262: changed_height = 216; break; - // case 270: changed_height = 240; break; - // } - // } - // - // if(changed_height == currprefs.gfx_size.height && hz == currprefs.chipset_refreshrate) - // return true; - // - // changed_prefs.gfx_size.height = changed_height; + int changed_height = changed_prefs.gfx_size.height; + + if (hz >= 55) + hz = 60; + else + hz = 50; + +// if(hz == 50 && currVSyncRate == 60) +// { +// // Switch from NTSC -> PAL +// switch(changed_height) { +// case 200: changed_height = 240; break; +// case 216: changed_height = 262; break; +// case 240: changed_height = 270; break; +// case 256: changed_height = 270; break; +// case 262: changed_height = 270; break; +// case 270: changed_height = 270; break; +// } +// } +// else if(hz == 60 && currVSyncRate == 50) +// { +// // Switch from PAL -> NTSC +// switch(changed_height) { +// case 200: changed_height = 200; break; +// case 216: changed_height = 200; break; +// case 240: changed_height = 200; break; +// case 256: changed_height = 216; break; +// case 262: changed_height = 216; break; +// case 270: changed_height = 240; break; +// } +// } +// + + if (!picasso_on && !picasso_requested_on) + changed_prefs.gfx_size.height = changed_height; return true; } diff --git a/src/osdep/picasso96.cpp b/src/osdep/picasso96.cpp index a38935cf..b26589a8 100644 --- a/src/osdep/picasso96.cpp +++ b/src/osdep/picasso96.cpp @@ -67,7 +67,7 @@ #define NOBLITTER_BLIT 0 #define NOBLITTER_ALL 0 -#ifdef RASPBERRY +#ifdef AMIBERRY static const int defaultHz = 50; #else static const int defaultHz = 60;