From 3e837ec4213cf25b28f3e58f7ed5cda78694a379 Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Thu, 21 Sep 2017 18:31:38 +0200 Subject: [PATCH] Use real pitch info for DispManX resource_write_data --- .gitignore | 3 +++ VSLinux/Amiberry.vcxproj | 9 +++++++-- src/osdep/rasp_gfx.cpp | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2f45c7910..8f684a04b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,6 @@ Amiberry/VisualGDB/Release-rpi2/Amiberry VSLinux/obj/ARM/Debug/Amiberry.tlog/unsuccessfulbuild *.lastbuildstate *.tlog +src/guisan/lib/libguisan.a +VisualGDB/VisualGDB/Debug/Amiberry-sdl2 +VSLinux/obj/ARM/Debug/amiberry-sdl2 diff --git a/VSLinux/Amiberry.vcxproj b/VSLinux/Amiberry.vcxproj index 33325fae2..8eaac5121 100644 --- a/VSLinux/Amiberry.vcxproj +++ b/VSLinux/Amiberry.vcxproj @@ -374,6 +374,7 @@ true + Makefile false @@ -396,8 +397,12 @@ - ..\src\threaddep;..\src\osdep;..\src\include;..\src;C:\sysroot\opt\vc\include\interface\vcos\pthreads;C:\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\sysroot\opt\vc\include;C:\sysroot\usr\include\SDL;C:\sysroot\usr\include\libxml2;$(IncludePath) - C:\sysroot\opt\vc\lib;C:\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath) + ..\src\threaddep;..\src\osdep;..\src\include;..\src;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;$(IncludePath) + C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\lib;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath) + + + C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\lib;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath) + ..\src\threaddep;..\src\osdep;..\src\include;..\src;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vcos\pthreads;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include\interface\vmcs_host\linux;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\include;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\SDL;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\include\libxml2;$(IncludePath) diff --git a/src/osdep/rasp_gfx.cpp b/src/osdep/rasp_gfx.cpp index 4030f7f24..2a662c6a1 100644 --- a/src/osdep/rasp_gfx.cpp +++ b/src/osdep/rasp_gfx.cpp @@ -233,7 +233,7 @@ static void open_screen(struct uae_prefs *p) vc_dispmanx_rect_set(&blit_rect, 0, 0, width, height); vc_dispmanx_resource_write_data(dispmanxresource_amigafb_1, VC_IMAGE_RGB565, - width *2, + prSDLScreen->pitch, prSDLScreen->pixels, &blit_rect); vc_dispmanx_rect_set(&src_rect, 0, 0, width << 16, height << 16); @@ -382,7 +382,7 @@ void flush_screen() current_resource_amigafb = 0; vc_dispmanx_resource_write_data( dispmanxresource_amigafb_1, VC_IMAGE_RGB565, - gfxvidinfo.outwidth * 2, + gfxvidinfo.rowbytes, gfxvidinfo.bufmem, &blit_rect); dispmanxupdate = vc_dispmanx_update_start(0); @@ -397,7 +397,7 @@ void flush_screen() current_resource_amigafb = 1; vc_dispmanx_resource_write_data( dispmanxresource_amigafb_2, VC_IMAGE_RGB565, - gfxvidinfo.outwidth * 2, + gfxvidinfo.rowbytes, gfxvidinfo.bufmem, &blit_rect); dispmanxupdate = vc_dispmanx_update_start(0);