Update Makefiles to latest build tools (#930)

* Update Makefiles to latest build tools

* Fix warnings about overlapping strings

* Fix oversight in GameCube compilation
This commit is contained in:
Carsten Teibes 2020-06-28 18:05:41 +02:00 committed by GitHub
parent 3252710eb7
commit f875dfe346
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 178 additions and 362 deletions

View File

@ -16,18 +16,18 @@ include $(DEVKITPPC)/gamecube_rules
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := snes9xgx-gc
TARGETDIR := executables
TARGETDIR := executables
BUILD := build_gc
SOURCES := source source/images source/sounds source/fonts source/lang \
source/gui source/utils source/utils/sz source/utils/vm \
SOURCES := source source/gui source/utils source/utils/sz source/utils/vm \
source/snes9x source/snes9x/apu
DATA := source/images source/sounds source/fonts source/lang
INCLUDES := source source/snes9x
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
-DHAVE_STDINT_H -DBLARGG_NONPORTABLE -DBLARGG_BIG_ENDIAN -DBLARGG_CPU_POWERPC \
-DZLIB -DRIGHTSHIFT_IS_SAR -DCPU_SHUTDOWN -DCORRECT_VRAM_READS \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ -DNO_SOUND -DUSE_VM \
@ -35,8 +35,10 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
-Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable -Wno-strict-aliasing \
-Wno-format -Wno-format-overflow -Wno-stringop-truncation -Wno-stringop-overflow -Wno-format-truncation -Wno-narrowing -Wno-sign-compare \
-Wno-unused-function -Wno-write-strings -Wno-parentheses
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
@ -57,7 +59,9 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
@ -67,10 +71,9 @@ CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf)))
LANGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.lang)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ttf) \
$(wildcard $(dir)/*.lang) $(wildcard $(dir)/*.png) \
$(wildcard $(dir)/*.pcm)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
@ -81,16 +84,16 @@ else
export LD := $(CXX)
endif
export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o) \
$(TTFFILES:.ttf=.ttf.o) $(LANGFILES:.lang=.lang.o) \
$(PNGFILES:.png=.png.o) \
$(PCMFILES:.pcm=.pcm.o)
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
@ -98,8 +101,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export LIBPATHS := -L$(LIBOGC_LIB) $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
.PHONY: $(BUILD) clean
@ -135,22 +137,24 @@ DEPENDS := $(OFILES:.o=.d)
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
$(OFILES_SOURCES) : $(HFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with these extensions: ttf lang png pcm
#---------------------------------------------------------------------------------
%.ttf.o : %.ttf
%.ttf.o %_ttf.h : %.ttf
@echo $(notdir $<)
$(bin2o)
%.lang.o : %.lang
%.lang.o %_lang.h : %.lang
@echo $(notdir $<)
$(bin2o)
%.png.o : %.png
%.png.o %_png.h : %.png
@echo $(notdir $<)
$(bin2o)
%.pcm.o : %.pcm
%.pcm.o %_pcm.h : %.pcm
@echo $(notdir $<)
$(bin2o)

View File

@ -16,18 +16,18 @@ include $(DEVKITPPC)/wii_rules
# INCLUDES is a list of directories containing extra header files
#---------------------------------------------------------------------------------
TARGET := snes9xgx-wii
TARGETDIR := executables
TARGETDIR := executables
BUILD := build_wii
SOURCES := source source/images source/sounds source/fonts source/lang \
source/gui source/utils source/utils/sz \
SOURCES := source source/gui source/utils source/utils/sz \
source/snes9x source/snes9x/apu
DATA := source/images source/sounds source/fonts source/lang
INCLUDES := source source/snes9x
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
-DHAVE_STDINT_H -DBLARGG_NONPORTABLE -DBLARGG_BIG_ENDIAN -DBLARGG_CPU_POWERPC \
-DZLIB -DRIGHTSHIFT_IS_SAR -DCPU_SHUTDOWN -DCORRECT_VRAM_READS \
-D_SZ_ONE_DIRECTORY -D_LZMA_IN_CB -D_LZMA_OUT_READ \
@ -37,7 +37,8 @@ CFLAGS = -g -O3 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags` \
-Wno-unused-function -Wno-write-strings -Wno-parentheses
CXXFLAGS = $(CFLAGS)
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
#---------------------------------------------------------------------------------
# any extra libraries we wish to link with the project
@ -58,7 +59,9 @@ ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
export DEPSDIR := $(CURDIR)/$(BUILD)
#---------------------------------------------------------------------------------
@ -68,12 +71,10 @@ CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.S)))
TTFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ttf)))
LANGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.lang)))
PNGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.png)))
OGGFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.ogg)))
PCMFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcm)))
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.ttf) \
$(wildcard $(dir)/*.lang) $(wildcard $(dir)/*.png) \
$(wildcard $(dir)/*.ogg) $(wildcard $(dir)/*.pcm)))
#---------------------------------------------------------------------------------
# use CXX for linking C++ projects, CC for standard C
#---------------------------------------------------------------------------------
@ -83,15 +84,16 @@ else
export LD := $(CXX)
endif
export OFILES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) \
$(sFILES:.s=.o) $(SFILES:.S=.o) \
$(TTFFILES:.ttf=.ttf.o) $(LANGFILES:.lang=.lang.o) \
$(PNGFILES:.png=.png.o) \
$(OGGFILES:.ogg=.ogg.o) $(PCMFILES:.pcm=.pcm.o)
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
export OFILES_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
#---------------------------------------------------------------------------------
# build a list of include paths
#---------------------------------------------------------------------------------
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
-I$(CURDIR)/$(BUILD) \
-I$(LIBOGC_INC)
@ -99,8 +101,7 @@ export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
#---------------------------------------------------------------------------------
# build a list of library paths
#---------------------------------------------------------------------------------
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
-L$(LIBOGC_LIB)
export LIBPATHS := -L$(LIBOGC_LIB) $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
export OUTPUT := $(CURDIR)/$(TARGETDIR)/$(TARGET)
.PHONY: $(BUILD) clean
@ -136,26 +137,28 @@ DEPENDS := $(OFILES:.o=.d)
$(OUTPUT).dol: $(OUTPUT).elf
$(OUTPUT).elf: $(OFILES)
$(OFILES_SOURCES) : $(HFILES)
#---------------------------------------------------------------------------------
# This rule links in binary data with these extensions: ttf lang png ogg pcm
#---------------------------------------------------------------------------------
%.ttf.o : %.ttf
%.ttf.o %_ttf.h : %.ttf
@echo $(notdir $<)
$(bin2o)
%.lang.o : %.lang
%.lang.o %_lang.h : %.lang
@echo $(notdir $<)
$(bin2o)
%.png.o : %.png
%.png.o %_png.h : %.png
@echo $(notdir $<)
$(bin2o)
%.ogg.o : %.ogg
%.ogg.o %_ogg.h : %.ogg
@echo $(notdir $<)
$(bin2o)
%.pcm.o : %.pcm
%.pcm.o %_pcm.h : %.pcm
@echo $(notdir $<)
$(bin2o)

View File

@ -241,7 +241,7 @@ int UpdateDirName()
if ((strlen(browser.dir)+1+strlen(browserList[browser.selIndex].filename)) < MAXPATHLEN)
{
/* update current directory name */
sprintf(browser.dir, "%s%s/",browser.dir, browserList[browser.selIndex].filename);
sprintf(browser.dir+strlen(browser.dir), "%s/", browserList[browser.selIndex].filename);
return 1;
}
else

View File

@ -13,7 +13,7 @@
#include <unistd.h>
#include <gccore.h>
#include <snes9xgx.h>
#include "snes9xgx.h"
#define MAXJOLIET 255
#ifdef HW_DOL

View File

@ -15,319 +15,128 @@
#include <gccore.h>
// Fonts
extern const u8 font_ttf[];
extern const u32 font_ttf_size;
#include "font_ttf.h"
// Languages
extern const u8 jp_lang[];
extern const u32 jp_lang_size;
extern const u8 en_lang[];
extern const u32 en_lang_size;
extern const u8 de_lang[];
extern const u32 de_lang_size;
extern const u8 fr_lang[];
extern const u32 fr_lang_size;
extern const u8 es_lang[];
extern const u32 es_lang_size;
extern const u8 it_lang[];
extern const u32 it_lang_size;
extern const u8 nl_lang[];
extern const u32 nl_lang_size;
extern const u8 zh_lang[];
extern const u32 zh_lang_size;
extern const u8 ko_lang[];
extern const u32 ko_lang_size;
extern const u8 pt_lang[];
extern const u32 pt_lang_size;
extern const u8 pt_br_lang[];
extern const u32 pt_br_lang_size;
extern const u8 ca_lang[];
extern const u32 ca_lang_size;
extern const u8 tr_lang[];
extern const u32 tr_lang_size;
#include "jp_lang.h"
#include "en_lang.h"
#include "de_lang.h"
#include "fr_lang.h"
#include "es_lang.h"
#include "it_lang.h"
#include "nl_lang.h"
#include "zh_lang.h"
#include "ko_lang.h"
#include "pt_lang.h"
#include "pt_br_lang.h"
#include "ca_lang.h"
#include "tr_lang.h"
// Sounds
extern const u8 bg_music_ogg[];
extern const u32 bg_music_ogg_size;
extern const u8 enter_ogg[];
extern const u32 enter_ogg_size;
extern const u8 exit_ogg[];
extern const u32 exit_ogg_size;
extern const u8 button_over_pcm[];
extern const u32 button_over_pcm_size;
extern const u8 button_click_pcm[];
extern const u32 button_click_pcm_size;
#ifdef HW_RVL
// background music is Wii-only
#include "bg_music_ogg.h"
#include "enter_ogg.h"
#include "exit_ogg.h"
#endif
#include "button_over_pcm.h"
#include "button_click_pcm.h"
// Graphics
extern const u8 logo_png[];
extern const u32 logo_png_size;
extern const u8 logo_over_png[];
extern const u32 logo_over_png_size;
extern const u8 bg_top_png[];
extern const u32 bg_top_png_size;
extern const u8 bg_bottom_png[];
extern const u32 bg_bottom_png_size;
extern const u8 icon_settings_png[];
extern const u32 icon_settings_png_size;
extern const u8 icon_home_png[];
extern const u32 icon_home_png_size;
extern const u8 icon_game_settings_png[];
extern const u32 icon_game_settings_png_size;
extern const u8 icon_game_cheats_png[];
extern const u32 icon_game_cheats_png_size;
extern const u8 icon_game_controllers_png[];
extern const u32 icon_game_controllers_png_size;
extern const u8 icon_game_load_png[];
extern const u32 icon_game_load_png_size;
extern const u8 icon_game_save_png[];
extern const u32 icon_game_save_png_size;
extern const u8 icon_game_delete_png[];
extern const u32 icon_game_delete_png_size;
extern const u8 icon_game_reset_png[];
extern const u32 icon_game_reset_png_size;
extern const u8 icon_settings_wiimote_png[];
extern const u32 icon_settings_wiimote_png_size;
extern const u8 icon_settings_classic_png[];
extern const u32 icon_settings_classic_png_size;
extern const u8 icon_settings_gamecube_png[];
extern const u32 icon_settings_gamecube_png_size;
extern const u8 icon_settings_nunchuk_png[];
extern const u32 icon_settings_nunchuk_png_size;
extern const u8 icon_settings_wiiupro_png[];
extern const u32 icon_settings_wiiupro_png_size;
extern const u8 icon_settings_drc_png[];
extern const u32 icon_settings_drc_png_size;
extern const u8 icon_settings_snescontroller_png[];
extern const u32 icon_settings_snescontroller_png_size;
extern const u8 icon_settings_superscope_png[];
extern const u32 icon_settings_superscope_png_size;
extern const u8 icon_settings_justifier_png[];
extern const u32 icon_settings_justifier_png_size;
extern const u8 icon_settings_mouse_png[];
extern const u32 icon_settings_mouse_png_size;
extern const u8 icon_settings_file_png[];
extern const u32 icon_settings_file_png_size;
extern const u8 icon_settings_mappings_png[];
extern const u32 icon_settings_mappings_png_size;
extern const u8 icon_settings_menu_png[];
extern const u32 icon_settings_menu_png_size;
extern const u8 icon_settings_network_png[];
extern const u32 icon_settings_network_png_size;
extern const u8 icon_settings_video_png[];
extern const u32 icon_settings_video_png_size;
extern const u8 icon_settings_audio_png[];
extern const u32 icon_settings_audio_png_size;
extern const u8 icon_settings_screenshot_png[];
extern const u32 icon_settings_screenshot_png_size;
extern const u8 button_png[];
extern const u32 button_png_size;
extern const u8 button_over_png[];
extern const u32 button_over_png_size;
extern const u8 button_prompt_png[];
extern const u32 button_prompt_png_size;
extern const u8 button_prompt_over_png[];
extern const u32 button_prompt_over_png_size;
extern const u8 button_long_png[];
extern const u32 button_long_png_size;
extern const u8 button_long_over_png[];
extern const u32 button_long_over_png_size;
extern const u8 button_short_png[];
extern const u32 button_short_png_size;
extern const u8 button_short_over_png[];
extern const u32 button_short_over_png_size;
extern const u8 button_small_png[];
extern const u32 button_small_png_size;
extern const u8 button_small_over_png[];
extern const u32 button_small_over_png_size;
extern const u8 button_large_png[];
extern const u32 button_large_png_size;
extern const u8 button_large_over_png[];
extern const u32 button_large_over_png_size;
extern const u8 button_arrow_left_png[];
extern const u32 button_arrow_left_png_size;
extern const u8 button_arrow_right_png[];
extern const u32 button_arrow_right_png_size;
extern const u8 button_arrow_up_png[];
extern const u32 button_arrow_up_png_size;
extern const u8 button_arrow_down_png[];
extern const u32 button_arrow_down_png_size;
extern const u8 button_arrow_left_over_png[];
extern const u32 button_arrow_left_over_png_size;
extern const u8 button_arrow_right_over_png[];
extern const u32 button_arrow_right_over_png_size;
extern const u8 button_arrow_up_over_png[];
extern const u32 button_arrow_up_over_png_size;
extern const u8 button_arrow_down_over_png[];
extern const u32 button_arrow_down_over_png_size;
extern const u8 button_gamesave_png[];
extern const u32 button_gamesave_png_size;
extern const u8 button_gamesave_over_png[];
extern const u32 button_gamesave_over_png_size;
extern const u8 button_gamesave_blank_png[];
extern const u32 button_gamesave_blank_png_size;
extern const u8 screen_position_png[];
extern const u32 screen_position_png_size;
extern const u8 dialogue_box_png[];
extern const u32 dialogue_box_png_size;
extern const u8 credits_box_png[];
extern const u32 credits_box_png_size;
extern const u8 progressbar_png[];
extern const u32 progressbar_png_size;
extern const u8 progressbar_empty_png[];
extern const u32 progressbar_empty_png_size;
extern const u8 progressbar_outline_png[];
extern const u32 progressbar_outline_png_size;
extern const u8 throbber_png[];
extern const u32 throbber_png_size;
extern const u8 icon_folder_png[];
extern const u32 icon_folder_png_size;
extern const u8 icon_sd_png[];
extern const u32 icon_sd_png_size;
extern const u8 icon_usb_png[];
extern const u32 icon_usb_png_size;
extern const u8 icon_dvd_png[];
extern const u32 icon_dvd_png_size;
extern const u8 icon_smb_png[];
extern const u32 icon_smb_png_size;
extern const u8 battery_png[];
extern const u32 battery_png_size;
extern const u8 battery_red_png[];
extern const u32 battery_red_png_size;
extern const u8 battery_bar_png[];
extern const u32 battery_bar_png_size;
extern const u8 bg_options_png[];
extern const u32 bg_options_png_size;
extern const u8 bg_options_entry_png[];
extern const u32 bg_options_entry_png_size;
extern const u8 bg_game_selection_png[];
extern const u32 bg_game_selection_png_size;
extern const u8 bg_game_selection_entry_png[];
extern const u32 bg_game_selection_entry_png_size;
extern const u8 bg_preview_png[];
extern const u32 bg_preview_png_size;
extern const u8 scrollbar_png[];
extern const u32 scrollbar_png_size;
extern const u8 scrollbar_arrowup_png[];
extern const u32 scrollbar_arrowup_png_size;
extern const u8 scrollbar_arrowup_over_png[];
extern const u32 scrollbar_arrowup_over_png_size;
extern const u8 scrollbar_arrowdown_png[];
extern const u32 scrollbar_arrowdown_png_size;
extern const u8 scrollbar_arrowdown_over_png[];
extern const u32 scrollbar_arrowdown_over_png_size;
extern const u8 scrollbar_box_png[];
extern const u32 scrollbar_box_png_size;
extern const u8 scrollbar_box_over_png[];
extern const u32 scrollbar_box_over_png_size;
extern const u8 keyboard_textbox_png[];
extern const u32 keyboard_textbox_png_size;
extern const u8 keyboard_key_png[];
extern const u32 keyboard_key_png_size;
extern const u8 keyboard_key_over_png[];
extern const u32 keyboard_key_over_png_size;
extern const u8 keyboard_mediumkey_png[];
extern const u32 keyboard_mediumkey_png_size;
extern const u8 keyboard_mediumkey_over_png[];
extern const u32 keyboard_mediumkey_over_png_size;
extern const u8 keyboard_largekey_png[];
extern const u32 keyboard_largekey_png_size;
extern const u8 keyboard_largekey_over_png[];
extern const u32 keyboard_largekey_over_png_size;
extern const u8 player1_point_png[];
extern const u32 player1_point_png_size;
extern const u8 player2_point_png[];
extern const u32 player2_point_png_size;
extern const u8 player3_point_png[];
extern const u32 player3_point_png_size;
extern const u8 player4_point_png[];
extern const u32 player4_point_png_size;
extern const u8 player1_grab_png[];
extern const u32 player1_grab_png_size;
extern const u8 player2_grab_png[];
extern const u32 player2_grab_png_size;
extern const u8 player3_grab_png[];
extern const u32 player3_grab_png_size;
extern const u8 player4_grab_png[];
extern const u32 player4_grab_png_size;
#include "logo_png.h"
#include "logo_over_png.h"
#include "bg_top_png.h"
#include "bg_bottom_png.h"
#include "icon_settings_png.h"
#include "icon_home_png.h"
#include "icon_game_settings_png.h"
#include "icon_game_cheats_png.h"
#include "icon_game_controllers_png.h"
#include "icon_game_load_png.h"
#include "icon_game_save_png.h"
#include "icon_game_delete_png.h"
#include "icon_game_reset_png.h"
#include "icon_settings_wiimote_png.h"
#include "icon_settings_classic_png.h"
#include "icon_settings_gamecube_png.h"
#include "icon_settings_nunchuk_png.h"
#include "icon_settings_wiiupro_png.h"
#include "icon_settings_drc_png.h"
#include "icon_settings_snescontroller_png.h"
#include "icon_settings_superscope_png.h"
#include "icon_settings_justifier_png.h"
#include "icon_settings_mouse_png.h"
#include "icon_settings_file_png.h"
#include "icon_settings_mappings_png.h"
#include "icon_settings_menu_png.h"
#include "icon_settings_network_png.h"
#include "icon_settings_video_png.h"
#include "icon_settings_audio_png.h"
#include "icon_settings_screenshot_png.h"
#include "button_png.h"
#include "button_over_png.h"
#include "button_prompt_png.h"
#include "button_prompt_over_png.h"
#include "button_long_png.h"
#include "button_long_over_png.h"
#include "button_short_png.h"
#include "button_short_over_png.h"
#include "button_small_png.h"
#include "button_small_over_png.h"
#include "button_large_png.h"
#include "button_large_over_png.h"
#include "button_arrow_left_png.h"
#include "button_arrow_right_png.h"
#include "button_arrow_up_png.h"
#include "button_arrow_down_png.h"
#include "button_arrow_left_over_png.h"
#include "button_arrow_right_over_png.h"
#include "button_arrow_up_over_png.h"
#include "button_arrow_down_over_png.h"
#include "button_gamesave_png.h"
#include "button_gamesave_over_png.h"
#include "button_gamesave_blank_png.h"
#include "screen_position_png.h"
#include "dialogue_box_png.h"
#include "credits_box_png.h"
#include "progressbar_png.h"
#include "progressbar_empty_png.h"
#include "progressbar_outline_png.h"
#include "throbber_png.h"
#include "icon_folder_png.h"
#include "icon_sd_png.h"
#include "icon_usb_png.h"
#include "icon_dvd_png.h"
#include "icon_smb_png.h"
#include "battery_png.h"
#include "battery_red_png.h"
#include "battery_bar_png.h"
#include "bg_options_png.h"
#include "bg_options_entry_png.h"
#include "bg_game_selection_png.h"
#include "bg_game_selection_entry_png.h"
#include "bg_preview_png.h"
#include "scrollbar_png.h"
#include "scrollbar_arrowup_png.h"
#include "scrollbar_arrowup_over_png.h"
#include "scrollbar_arrowdown_png.h"
#include "scrollbar_arrowdown_over_png.h"
#include "scrollbar_box_png.h"
#include "scrollbar_box_over_png.h"
#include "keyboard_textbox_png.h"
#include "keyboard_key_png.h"
#include "keyboard_key_over_png.h"
#include "keyboard_mediumkey_png.h"
#include "keyboard_mediumkey_over_png.h"
#include "keyboard_largekey_png.h"
#include "keyboard_largekey_over_png.h"
#include "player1_point_png.h"
#include "player2_point_png.h"
#include "player3_point_png.h"
#include "player4_point_png.h"
#include "player1_grab_png.h"
#include "player2_grab_png.h"
#include "player3_grab_png.h"
#include "player4_grab_png.h"
#endif

View File

@ -54,7 +54,7 @@ SaveSnapshot (char * filepath, bool silent)
char screenpath[1024];
strcpy(screenpath, filepath);
screenpath[strlen(screenpath)-4] = 0;
sprintf(screenpath, "%s.png", screenpath);
strcat(screenpath, ".png");
SaveFile((char *)gameScreenPng, screenpath, gameScreenPngSize, silent);
}
@ -157,7 +157,7 @@ int SavePreviewImg (char * filepath, bool silent)
char screenpath[1024];
strcpy(screenpath, filepath);
screenpath[strlen(screenpath)] = 0;
sprintf(screenpath, "%s.png", screenpath);
strcat(screenpath, ".png");
SaveFile((char *)gameScreenPng, screenpath, gameScreenPngSize, silent);
}
return 1;

View File

@ -1853,17 +1853,17 @@ static int MenuGameSaves(int action)
case FILE_SRAM:
strncpy(deletepath, filepath, 1024);
deletepath[strlen(deletepath)-4] = 0;
sprintf(deletepath, "%s.srm", deletepath);
strcat(deletepath, ".srm");
remove(deletepath); // Delete the *.srm file (Battery save file)
break;
case FILE_SNAPSHOT:
strncpy(deletepath, filepath, 1024);
deletepath[strlen(deletepath)-4] = 0;
sprintf(deletepath, "%s.png", deletepath);
strcat(deletepath, ".png");
remove(deletepath); // Delete the *.png file (Screenshot file)
strncpy(deletepath, filepath, 1024);
deletepath[strlen(deletepath)-4] = 0;
sprintf(deletepath, "%s.frz", deletepath);
strcat(deletepath, ".frz");
remove(deletepath); // Delete the *.frz file (Save State file)
break;
}