Skip to content

Commit

Permalink
Use real pitch info for DispManX resource_write_data
Browse files Browse the repository at this point in the history
  • Loading branch information
midwan committed Sep 21, 2017
1 parent 46a85cd commit 3e837ec
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -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
9 changes: 7 additions & 2 deletions VSLinux/Amiberry.vcxproj
Expand Up @@ -374,6 +374,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<ConfigurationType>Makefile</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
Expand All @@ -396,8 +397,12 @@
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<IncludePath>..\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)</IncludePath>
<LibraryPath>C:\sysroot\opt\vc\lib;C:\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath)</LibraryPath>
<IncludePath>..\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)</IncludePath>
<LibraryPath>C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\lib;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<LibraryPath>C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\opt\vc\lib;C:\SysGCC\raspberry\arm-linux-gnueabihf\sysroot\usr\lib\arm-linux-gnueabihf;$(LibraryPath)</LibraryPath>
<IncludePath>..\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)</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
Expand Down
6 changes: 3 additions & 3 deletions src/osdep/rasp_gfx.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 3e837ec

Please sign in to comment.