mirror of https://github.com/PCSX2/pcsx2.git
Use GResources API instead of deprecated inline
This commit is contained in:
parent
15d66cf337
commit
e5e601eb75
|
@ -112,6 +112,7 @@ set(GSdxSources
|
|||
GSWndOGL.cpp
|
||||
GSWndEGL.cpp
|
||||
GSdx.cpp
|
||||
GSdxResources.cpp
|
||||
stdafx.cpp
|
||||
)
|
||||
|
||||
|
@ -144,7 +145,6 @@ set(GSdxHeaders
|
|||
GSDrawingEnvironment.h
|
||||
GSDump.h
|
||||
GSFunctionMap.h
|
||||
GSLinuxLogo.h
|
||||
GSLocalMemory.h
|
||||
GSPerfMon.h
|
||||
GSRasterizer.h
|
||||
|
@ -176,6 +176,7 @@ set(GSdxHeaders
|
|||
GSWndOGL.h
|
||||
GSWndEGL.h
|
||||
GSdx.h
|
||||
GSdxResources.h
|
||||
res/glsl_source.h
|
||||
stdafx.h
|
||||
xbyak/xbyak.h
|
||||
|
@ -214,6 +215,10 @@ if (REBUILD_SHADER)
|
|||
add_custom_command(OUTPUT res/glsl_source.h COMMAND perl ${CMAKE_SOURCE_DIR}/linux_various/glsl2h.pl)
|
||||
endif()
|
||||
|
||||
# Note: trying to combine --generate-source and --generate-header doesn't work. It outputs whichever one comes last into the file named by the first
|
||||
execute_process(COMMAND glib-compile-resources --sourcedir res --generate-header --c-name GSdx_res res/gsdx-res.xml --target=GSdxResources.h WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
execute_process(COMMAND glib-compile-resources --sourcedir res --generate-source --c-name GSdx_res res/gsdx-res.xml --target=GSdxResources.cpp WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
if(BUILTIN_GS)
|
||||
add_pcsx2_lib(${Output} "${GSdxFinalSources}" "${GSdxFinalLibs}" "${GSdxFinalFlags}")
|
||||
else()
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include "GS.h"
|
||||
#include "GSdx.h"
|
||||
#include "GSLinuxLogo.h"
|
||||
#include "GSdxResources.h"
|
||||
#include "GSSetting.h"
|
||||
|
||||
static GtkWidget* s_hack_frame;
|
||||
|
@ -500,8 +500,11 @@ bool RunLinuxDialog()
|
|||
GtkWidget* osd_box = gtk_vbox_new(false, 5);
|
||||
|
||||
// Grab a logo, to make things look nice.
|
||||
GdkPixbuf* logo_pixmap = gdk_pixbuf_from_pixdata(&gsdx_ogl_logo, false, NULL);
|
||||
GtkWidget* logo_image = gtk_image_new_from_pixbuf(logo_pixmap);
|
||||
GResource * resources = GSdx_res_get_resource();
|
||||
GInputStream * ogl_stream=g_resource_open_stream(resources,"/GSdx/res/logo-ogl.bmp",G_RESOURCE_LOOKUP_FLAGS_NONE,NULL);
|
||||
GdkPixbuf * ogl_logo = gdk_pixbuf_new_from_stream(ogl_stream,NULL,NULL);
|
||||
g_object_unref(ogl_stream);
|
||||
GtkWidget* logo_image = gtk_image_new_from_pixbuf(ogl_logo);
|
||||
gtk_box_pack_start(GTK_BOX(main_box), logo_image, true, true, 0);
|
||||
|
||||
GtkWidget* main_table = CreateTableInBox(main_box , NULL , 2 , 2);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="/GSdx/res/">
|
||||
<file preprocess="to-pixdata">logo-ogl.bmp</file>
|
||||
</gresource>
|
||||
</gresources>
|
Loading…
Reference in New Issue