Merge commit '243f563271' into dev

This commit is contained in:
Dimitris Panokostas 2017-04-10 18:26:41 +02:00
commit aace8e3f38
6 changed files with 18 additions and 2 deletions

View file

@ -90,6 +90,7 @@
<Image Include="..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\cursor-x2.bmp" />
<Image Include="..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>

View file

@ -131,6 +131,9 @@
<Image Include="..\data\cursor.bmp">
<Filter>data</Filter>
</Image>
<Image Include="..\data\cursor-x2.bmp">
<Filter>data</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\data\FreeSans.ttf">

View file

@ -272,6 +272,7 @@
<Image Include="..\..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\cursor-x2.bmp" />
<Image Include="..\..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>

View file

@ -602,6 +602,9 @@
<Image Include="..\..\data\cursor.bmp">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\cursor-x2.bmp">
<Filter>Resource files\data</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\..\data\FreeSans.ttf">

BIN
data/cursor-x2.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View file

@ -62,6 +62,7 @@ SDL_Surface* gui_screen;
SDL_Texture* gui_texture;
SDL_Event gui_event;
SDL_Cursor* cursor;
SDL_Surface *cursorSurface;
/*
* Guisan SDL stuff we need
@ -156,8 +157,15 @@ namespace sdl
//-------------------------------------------------
// Create new screen for GUI
//-------------------------------------------------
SDL_Surface *cursorSurface = SDL_LoadBMP("data/cursor.bmp");
if (sdlMode.w > 1280)
{
// High resolution detected, we'll use a double-size cursor
cursorSurface = SDL_LoadBMP("data/cursor-x2.bmp");
}
else
{
cursorSurface = SDL_LoadBMP("data/cursor.bmp");
}
if (cursorSurface)
{
cursor = SDL_CreateColorCursor(cursorSurface, 0, 0);