Add icon to WGL.

This commit is contained in:
Themaister 2012-10-11 00:09:24 +02:00
parent 6e1b2c6291
commit cf37629d0d
5 changed files with 16 additions and 5 deletions

@ -21,7 +21,8 @@ OBJ = retroarch.o \
audio/null.o \
input/null.o \
fifo_buffer.o \
gfx/null.o
gfx/null.o \
media/rarch.o
JOBJ := conf/config_file.o \
tools/retroarch-joyconfig.o \
@ -31,6 +32,7 @@ JOBJ := conf/config_file.o \
CC = gcc
CXX = g++
WINDRES = windres
HAVE_DINPUT = 1
HAVE_XAUDIO = 1
@ -226,6 +228,10 @@ $(TARGET): $(OBJ)
$(Q)$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
@$(if $(Q), $(shell echo echo CC $<),)
%.o: %.rc
$(Q)$(WINDRES) -o $@ $<
@$(if $(Q), $(shell echo echo WINDRES $<),)
$(JTARGET): $(JOBJ)
ifeq ($(CXX_BUILD), 1)
$(Q)$(CXX) -o $@ $(JOBJ) -lSDL -ldxguid -ldinput8 -lole32 $(LDFLAGS)

@ -22,6 +22,8 @@
#include "../gfx_common.h"
#include <windows.h>
#define IDI_ICON 1
static HWND g_hwnd;
static HGLRC g_hrc;
static HDC g_hdc;
@ -198,6 +200,8 @@ static bool gfx_ctx_init(void)
wndclass.hInstance = GetModuleHandle(NULL);
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
wndclass.lpszClassName = "RetroArch";
wndclass.hIcon = LoadIcon(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON));
wndclass.hIconSm = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_ICON), IMAGE_ICON, 16, 16, 0);
if (!RegisterClassEx(&wndclass))
return false;

1
media/rarch.rc Normal file

@ -0,0 +1 @@
1 ICON DISCARDABLE retroarch-icon.ico

BIN
media/retroarch-icon.ico Normal file

Binary file not shown.

After

(image error) Size: 9.4 KiB

@ -96,8 +96,8 @@ do_build()
fi
make -f Makefile.win clean || die "Failed to clean ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" -j4 all SLIM=1 || die "Failed to build ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" dist_${BUILDTYPE} SLIM=1 || die "Failed to dist ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" WINDRES="$WINDRES" -j4 all SLIM=1 || die "Failed to build ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" WINDRES="$WINDRES" dist_${BUILDTYPE} SLIM=1 || die "Failed to dist ..."
if [ -z "`find . | grep "retroarch-win"`" ]; then
die "Did not find build ..."
fi
@ -116,8 +116,8 @@ do_build()
mv -v "$ZIP_BASE" "../$ZIP_SLIM" || die "Failed to move final build ..."
make -f Makefile.win clean || die "Failed to clean ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" -j4 all || die "Failed to build ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" dist_${BUILDTYPE} || die "Failed to dist ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" WINDRES="$WINDRES" -j4 all || die "Failed to build ..."
make -f Makefile.win $MAKEARGS CC="$C_COMPILER" CXX="$CXX_COMPILER" WINDRES="$WINDRES" dist_${BUILDTYPE} || die "Failed to dist ..."
if [ "$BUILD_PHOENIX_GUI" = "yes" ]; then
zip "$ZIP_BASE" retroarch-phoenix.exe retroarch-phoenix.cfg