diff --git a/.gitignore b/.gitignore
index 2f45c791..8f684a04 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 33325fae..8eaac512 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 4030f7f2..2a662c6a 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);