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
|
GSWndOGL.cpp
|
||||||
GSWndEGL.cpp
|
GSWndEGL.cpp
|
||||||
GSdx.cpp
|
GSdx.cpp
|
||||||
|
GSdxResources.cpp
|
||||||
stdafx.cpp
|
stdafx.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -144,7 +145,6 @@ set(GSdxHeaders
|
||||||
GSDrawingEnvironment.h
|
GSDrawingEnvironment.h
|
||||||
GSDump.h
|
GSDump.h
|
||||||
GSFunctionMap.h
|
GSFunctionMap.h
|
||||||
GSLinuxLogo.h
|
|
||||||
GSLocalMemory.h
|
GSLocalMemory.h
|
||||||
GSPerfMon.h
|
GSPerfMon.h
|
||||||
GSRasterizer.h
|
GSRasterizer.h
|
||||||
|
@ -176,6 +176,7 @@ set(GSdxHeaders
|
||||||
GSWndOGL.h
|
GSWndOGL.h
|
||||||
GSWndEGL.h
|
GSWndEGL.h
|
||||||
GSdx.h
|
GSdx.h
|
||||||
|
GSdxResources.h
|
||||||
res/glsl_source.h
|
res/glsl_source.h
|
||||||
stdafx.h
|
stdafx.h
|
||||||
xbyak/xbyak.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)
|
add_custom_command(OUTPUT res/glsl_source.h COMMAND perl ${CMAKE_SOURCE_DIR}/linux_various/glsl2h.pl)
|
||||||
endif()
|
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)
|
if(BUILTIN_GS)
|
||||||
add_pcsx2_lib(${Output} "${GSdxFinalSources}" "${GSdxFinalLibs}" "${GSdxFinalFlags}")
|
add_pcsx2_lib(${Output} "${GSdxFinalSources}" "${GSdxFinalLibs}" "${GSdxFinalFlags}")
|
||||||
else()
|
else()
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "GSdx.h"
|
#include "GSdx.h"
|
||||||
#include "GSLinuxLogo.h"
|
#include "GSdxResources.h"
|
||||||
#include "GSSetting.h"
|
#include "GSSetting.h"
|
||||||
|
|
||||||
static GtkWidget* s_hack_frame;
|
static GtkWidget* s_hack_frame;
|
||||||
|
@ -500,8 +500,11 @@ bool RunLinuxDialog()
|
||||||
GtkWidget* osd_box = gtk_vbox_new(false, 5);
|
GtkWidget* osd_box = gtk_vbox_new(false, 5);
|
||||||
|
|
||||||
// Grab a logo, to make things look nice.
|
// Grab a logo, to make things look nice.
|
||||||
GdkPixbuf* logo_pixmap = gdk_pixbuf_from_pixdata(&gsdx_ogl_logo, false, NULL);
|
GResource * resources = GSdx_res_get_resource();
|
||||||
GtkWidget* logo_image = gtk_image_new_from_pixbuf(logo_pixmap);
|
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);
|
gtk_box_pack_start(GTK_BOX(main_box), logo_image, true, true, 0);
|
||||||
|
|
||||||
GtkWidget* main_table = CreateTableInBox(main_box , NULL , 2 , 2);
|
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