Merge commit 'fb023d0546' into dev

This commit is contained in:
Dimitris Panokostas 2017-04-10 18:26:33 +02:00
commit 2fc7853637
10 changed files with 42 additions and 5 deletions

View file

@ -90,6 +90,9 @@
<Image Include="..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\data\delete.png">
<DeploymentContent>true</DeploymentContent>
</Image>
@ -134,6 +137,9 @@
<Font Include="..\data\FreeSans.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
<Font Include="..\data\Topaznew.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
</ItemGroup>
<ItemGroup>
<None Include="..\Makefile">

View file

@ -128,11 +128,17 @@
<Image Include="..\data\sound.ico">
<Filter>data</Filter>
</Image>
<Image Include="..\data\cursor.bmp">
<Filter>data</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\data\FreeSans.ttf">
<Filter>data</Filter>
</Font>
<Font Include="..\data\Topaznew.ttf">
<Filter>data</Filter>
</Font>
</ItemGroup>
<ItemGroup>
<None Include="..\Makefile" />

View file

@ -272,6 +272,9 @@
<Image Include="..\..\data\cpu.ico">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\cursor.bmp">
<DeploymentContent>true</DeploymentContent>
</Image>
<Image Include="..\..\data\delete.png">
<DeploymentContent>true</DeploymentContent>
</Image>
@ -316,6 +319,9 @@
<Font Include="..\..\data\FreeSans.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
<Font Include="..\..\data\Topaznew.ttf">
<DeploymentContent>true</DeploymentContent>
</Font>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\archivers\7z\7zAlloc.h" />

View file

@ -599,11 +599,17 @@
<Image Include="..\..\data\sound.ico">
<Filter>Resource files\data</Filter>
</Image>
<Image Include="..\..\data\cursor.bmp">
<Filter>Resource files\data</Filter>
</Image>
</ItemGroup>
<ItemGroup>
<Font Include="..\..\data\FreeSans.ttf">
<Filter>Resource files\data</Filter>
</Font>
<Font Include="..\..\data\Topaznew.ttf">
<Filter>Resource files\data</Filter>
</Font>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\include\akiko.h">

BIN
data/Topaznew.ttf Normal file

Binary file not shown.

BIN
data/cursor.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -1079,6 +1079,8 @@ static int real_main2 (int argc, TCHAR **argv)
if (SDL_SetHint(SDL_HINT_GRAB_KEYBOARD, "1") != SDL_TRUE)
SDL_Log("SDL could not grab the keyboard");
SDL_ShowCursor(SDL_DISABLE);
set_config_changed();
if (restart_config[0]) {

View file

@ -176,8 +176,8 @@ static void open_screen(struct uae_prefs* p)
void update_display(struct uae_prefs* p)
{
open_screen(p);
SDL_ShowCursor(SDL_DISABLE);
open_screen(p);
framecnt = 1; // Don't draw frame before reset done
}

View file

@ -4,6 +4,7 @@ extern SDL_Window* sdlWindow;
extern SDL_Renderer* renderer;
extern SDL_Texture* texture;
extern SDL_Surface* screen;
extern SDL_Cursor* cursor;
extern SDL_Surface* gui_screen;
extern SDL_Texture* gui_texture;
@ -12,4 +13,4 @@ extern SDL_DisplayMode sdlMode;
extern void check_error_sdl(bool check, const char* message);
extern void updatedisplayarea();
void DX_Fill(int dstx, int dsty, int width, int height, uae_u32 color);
void DX_Fill(int dstx, int dsty, int width, int height, uae_u32 color);

View file

@ -12,7 +12,6 @@
#include "uae.h"
#include "gui.h"
#include "gui_handling.h"
#include "memory.h"
#include "amiberry_gfx.h"
bool gui_running = false;
@ -62,6 +61,7 @@ enum
SDL_Surface* gui_screen;
SDL_Texture* gui_texture;
SDL_Event gui_event;
SDL_Cursor* cursor;
/*
* Guisan SDL stuff we need
@ -157,6 +157,13 @@ namespace sdl
// Create new screen for GUI
//-------------------------------------------------
SDL_Surface *cursorSurface = SDL_LoadBMP("data/cursor.bmp");
if (cursorSurface)
{
cursor = SDL_CreateColorCursor(cursorSurface, 0, 0);
SDL_SetCursor(cursor);
}
// make the scaled rendering look smoother (linear scaling).
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
@ -194,9 +201,12 @@ namespace sdl
delete gui_imageLoader;
delete gui_input;
delete gui_graphics;
SDL_FreeSurface(gui_screen);
SDL_DestroyTexture(gui_texture);
if (cursor) {
SDL_FreeCursor(cursor);
}
gui_screen = nullptr;
}
@ -462,7 +472,7 @@ namespace widgets
// Initialize fonts
//-------------------------------------------------
TTF_Init();
gui_font = new gcn::SDLTrueTypeFont("data/FreeSans.ttf", 14);
gui_font = new gcn::SDLTrueTypeFont("data/Topaznew.ttf", 14);
gcn::Widget::setGlobalFont(gui_font);
//--------------------------------------------------