Conflicts:
	qb/config.libs.sh
This commit is contained in:
Toad King 2012-06-07 20:22:50 -04:00
commit 88144ba6d2
48 changed files with 620 additions and 387 deletions

View File

@ -6,17 +6,17 @@
<XuiScene> <XuiScene>
<Properties> <Properties>
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>752.000061</Width> <Width>584.528076</Width>
<Height>512.000122</Height> <Height>363.320007</Height>
<Position>264.000031,88.000008,0.000000</Position> <Position>347.429474,184.843964,0.000000</Position>
<ClassOverride>RetroArchMain</ClassOverride> <ClassOverride>RetroArchMain</ClassOverride>
</Properties> </Properties>
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnRomBrowser</Id> <Id>XuiBtnRomBrowser</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>38.127724,73.215515,0.000000</Position> <Position>38.127724,64.215515,0.000000</Position>
<Pivot>245.362122,102.247192,0.000000</Pivot> <Pivot>245.362122,102.247192,0.000000</Pivot>
<NavUp>XuiBtnQuit</NavUp> <NavUp>XuiBtnQuit</NavUp>
<NavDown>XuiBtnQuickMenu</NavDown> <NavDown>XuiBtnQuickMenu</NavDown>
@ -39,9 +39,9 @@
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnSettings</Id> <Id>XuiBtnSettings</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>40.000000,263.960022,0.000000</Position> <Position>38.127960,196.615982,0.000000</Position>
<NavUp>XuiBtnControls</NavUp> <NavUp>XuiBtnControls</NavUp>
<NavDown>XuiBtnLibsnesCore</NavDown> <NavDown>XuiBtnLibsnesCore</NavDown>
<Text>Settings</Text> <Text>Settings</Text>
@ -50,9 +50,9 @@
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnQuit</Id> <Id>XuiBtnQuit</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>40.199776,392.352020,0.000000</Position> <Position>38.327736,287.007996,0.000000</Position>
<Pivot>245.162109,-84.153275,0.000000</Pivot> <Pivot>245.162109,-84.153275,0.000000</Pivot>
<NavUp>XuiBtnLibsnesCore</NavUp> <NavUp>XuiBtnLibsnesCore</NavUp>
<NavDown>XuiBtnRomBrowser</NavDown> <NavDown>XuiBtnRomBrowser</NavDown>
@ -64,7 +64,7 @@
<Id>XuiLblCore</Id> <Id>XuiLblCore</Id>
<Width>124.000000</Width> <Width>124.000000</Width>
<Height>28.000000</Height> <Height>28.000000</Height>
<Position>40.000000,448.400055,0.000000</Position> <Position>12.544006,324.792023,0.000000</Position>
<Text>Libretro core:</Text> <Text>Libretro core:</Text>
</Properties> </Properties>
</XuiLabel> </XuiLabel>
@ -73,7 +73,7 @@
<Id>XuiTxtCoreText</Id> <Id>XuiTxtCoreText</Id>
<Width>224.399963</Width> <Width>224.399963</Width>
<Height>34.000000</Height> <Height>34.000000</Height>
<Position>162.400024,448.000031,0.000000</Position> <Position>134.944031,324.391998,0.000000</Position>
<TextColor>0xff0f0f0f</TextColor> <TextColor>0xff0f0f0f</TextColor>
<DropShadowColor>0x800f0f0f</DropShadowColor> <DropShadowColor>0x800f0f0f</DropShadowColor>
<Font>Arial Unicode MS</Font> <Font>Arial Unicode MS</Font>
@ -82,9 +82,9 @@
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnQuickMenu</Id> <Id>XuiBtnQuickMenu</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>39.999996,138.000000,0.000000</Position> <Position>38.130001,106.655991,0.000000</Position>
<NavUp>XuiBtnRomBrowser</NavUp> <NavUp>XuiBtnRomBrowser</NavUp>
<NavDown>XuiBtnControls</NavDown> <NavDown>XuiBtnControls</NavDown>
<Text>Quick Menu</Text> <Text>Quick Menu</Text>
@ -93,9 +93,9 @@
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnControls</Id> <Id>XuiBtnControls</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>40.002041,202.000015,0.000000</Position> <Position>38.130001,151.655991,0.000000</Position>
<NavUp>XuiBtnQuickMenu</NavUp> <NavUp>XuiBtnQuickMenu</NavUp>
<NavDown>XuiBtnSettings</NavDown> <NavDown>XuiBtnSettings</NavDown>
<Text>Controls</Text> <Text>Controls</Text>
@ -104,9 +104,9 @@
<XuiButton> <XuiButton>
<Properties> <Properties>
<Id>XuiBtnLibsnesCore</Id> <Id>XuiBtnLibsnesCore</Id>
<Width>689.672302</Width> <Width>488.312012</Width>
<Height>48.992096</Height> <Height>30.799988</Height>
<Position>40.000000,328.959991,0.000000</Position> <Position>38.127960,241.615982,0.000000</Position>
<NavUp>XuiBtnSettings</NavUp> <NavUp>XuiBtnSettings</NavUp>
<NavDown>XuiBtnQuit</NavDown> <NavDown>XuiBtnQuit</NavDown>
<Text>Change libretro core</Text> <Text>Change libretro core</Text>

View File

@ -8,7 +8,7 @@
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>824.000061</Width> <Width>824.000061</Width>
<Height>496.000061</Height> <Height>496.000061</Height>
<Position>182.000031,120.000023,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchQuickMenu</ClassOverride> <ClassOverride>RetroArchQuickMenu</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -127,6 +127,18 @@ Return to Dashboard
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>584.528076</Width> <Width>584.528076</Width>
<Height>363.320007</Height> <Height>363.320007</Height>
<Position>344.000031,184.000015,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchControls</ClassOverride> <ClassOverride>RetroArchControls</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -266,6 +266,18 @@ Reset all buttons to defaults
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiSceneFileBrowser</Id> <Id>XuiSceneFileBrowser</Id>
<Width>575.888062</Width> <Width>575.888062</Width>
<Height>336.017609</Height> <Height>336.017609</Height>
<Position>333.995880,209.035965,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchFileBrowser</ClassOverride> <ClassOverride>RetroArchFileBrowser</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -129,6 +129,18 @@
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiSceneCoreFileBrowser</Id> <Id>XuiSceneCoreFileBrowser</Id>
<Width>575.888062</Width> <Width>575.888062</Width>
<Height>336.017609</Height> <Height>336.017609</Height>
<Position>353.995880,209.035965,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchCoreBrowser</ClassOverride> <ClassOverride>RetroArchCoreBrowser</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -139,6 +139,18 @@
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>584.528076</Width> <Width>584.528076</Width>
<Height>363.320007</Height> <Height>363.320007</Height>
<Position>347.429474,184.843964,0.000000</Position> <Position>32.029472,76.043968,0.000000</Position>
<ClassOverride>RetroArchMain</ClassOverride> <ClassOverride>RetroArchMain</ClassOverride>
</Properties> </Properties>
<XuiButton> <XuiButton>

View File

@ -8,7 +8,7 @@
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>584.528076</Width> <Width>584.528076</Width>
<Height>363.320007</Height> <Height>363.320007</Height>
<Position>302.429474,184.843964,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchQuickMenu</ClassOverride> <ClassOverride>RetroArchQuickMenu</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -115,6 +115,18 @@ Return to Dashboard
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiScene1</Id> <Id>XuiScene1</Id>
<Width>584.528076</Width> <Width>584.528076</Width>
<Height>363.320007</Height> <Height>363.320007</Height>
<Position>344.000031,184.000015,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchSettings</ClassOverride> <ClassOverride>RetroArchSettings</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -187,6 +187,18 @@ Cutom Scaling Factor:
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -8,7 +8,7 @@
<Id>XuiSceneCoreFileBrowser</Id> <Id>XuiSceneCoreFileBrowser</Id>
<Width>575.888062</Width> <Width>575.888062</Width>
<Height>336.017609</Height> <Height>336.017609</Height>
<Position>353.995880,209.035965,0.000000</Position> <Position>32.029999,76.040001,0.000000</Position>
<ClassOverride>RetroArchShaderBrowser</ClassOverride> <ClassOverride>RetroArchShaderBrowser</ClassOverride>
</Properties> </Properties>
<XuiText> <XuiText>
@ -175,6 +175,18 @@
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing> <InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties> </Properties>
</XuiListItem> </XuiListItem>
<XuiListItem>
<Properties>
<Id>control_ListItem</Id>
<Width>226.000000</Width>
<Height>45.000000</Height>
<Position>7.000000,22.000000,0.000000</Position>
<Anchor>5</Anchor>
<Show>false</Show>
<Visual>XuiButton</Visual>
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
</Properties>
</XuiListItem>
</XuiCommonList> </XuiCommonList>
<XuiBackButton> <XuiBackButton>
<Properties> <Properties>

View File

@ -798,6 +798,8 @@ int menu_init (void)
xdk360_video_t *vid = (xdk360_video_t*)driver.video_data; xdk360_video_t *vid = (xdk360_video_t*)driver.video_data;
bool hdmenus_allowed = g_console.menus_hd_enable;
hr = app.InitShared(vid->d3d_render_device, &vid->d3dpp, XuiPNGTextureLoader); hr = app.InitShared(vid->d3d_render_device, &vid->d3dpp, XuiPNGTextureLoader);
if (hr < 0) if (hr < 0)
@ -821,7 +823,7 @@ int menu_init (void)
return 1; return 1;
} }
hr = XuiSceneCreate(L"file://game:/media/sd/", L"rarch_main.xur", NULL, &app.hMainScene); hr = XuiSceneCreate(hdmenus_allowed ? L"file://game:/media/hd/" : L"file://game:/media/sd/", L"rarch_main.xur", NULL, &app.hMainScene);
if (hr < 0) if (hr < 0)
{ {
RARCH_ERR("Failed to create scene 'rarch_main.xur'.\n"); RARCH_ERR("Failed to create scene 'rarch_main.xur'.\n");

View File

@ -11,3 +11,6 @@ Daniel De Matteis - <autechre1024@hotmail.com>
- PlayStation 3 port - PlayStation 3 port
- XBox 360 XDK port - XBox 360 XDK port
tukuyomi - <tukuyomi@free.fr>
- Cleanups in quickbuild

View File

@ -1,4 +1,4 @@
RARCH_VERSION = "0.9.6-rc1" RARCH_VERSION = "0.9.6"
#which compiler to build with - GCC or SNC #which compiler to build with - GCC or SNC
#set to GCC for debug builds for use with debugger #set to GCC for debug builds for use with debugger
@ -122,7 +122,7 @@ create-salamander:
create-shaders: create-shaders:
ifeq ($(DOWNLOAD_SHADERS),1) ifeq ($(DOWNLOAD_SHADERS),1)
$(RM) -rf ps3/pkg/USRDIR/cores/shaders $(RM) -rf ps3/pkg/USRDIR/cores/shaders
$(GIT) clone git://github.com/twinaphex/common-shaders.git ps3/pkg/USRDIR/cores/shaders $(GIT) clone git://github.com/libretro/common-shaders.git ps3/pkg/USRDIR/cores/shaders
endif endif
pkg: $(PPU_TARGET) create-shaders create-npdrm-salamander create-npdrm-core pkg: $(PPU_TARGET) create-shaders create-npdrm-salamander create-npdrm-core

View File

@ -37,7 +37,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER CFLAGS += -DHAVE_FILE_LOGGER
endif endif
CFLAGS += -std=gnu99 -DRARCH_CONSOLE -DHAVE_CONFIGFILE=1 -DGEKKO -DHW_RVL -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_FREETYPE -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"0.9.6-rc1\" -Dmain=ssnes_main -Wno-char-subscripts -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) CFLAGS += -std=gnu99 -DRARCH_CONSOLE -DHAVE_CONFIGFILE=1 -DGEKKO -DHW_RVL -DHAVE_ZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_FREETYPE -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"0.9.6\" -Dmain=ssnes_main -Wno-char-subscripts -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
CFLAGS += -O0 -g CFLAGS += -O0 -g

View File

@ -30,7 +30,7 @@ endif
libretro ?= -lretro libretro ?= -lretro
LIBS = -lm LIBS = -lm
DEFINES = -I. -DHAVE_CONFIGFILE -DHAVE_SDL -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DPACKAGE_VERSION=\"0.9.6-rc1\" DEFINES = -I. -DHAVE_CONFIGFILE -DHAVE_SDL -DHAVE_SCREENSHOTS -DHAVE_BSV_MOVIE -DPACKAGE_VERSION=\"0.9.6\"
LDFLAGS = -L. -static-libgcc LDFLAGS = -L. -static-libgcc
LDCXXFLAGS = -s LDCXXFLAGS = -s
@ -192,10 +192,10 @@ clean:
rm -f tools/*.o rm -f tools/*.o
dist_x86: all dist_x86: all
zip -r retroarch-win32-0.9.6-rc1.zip $(TARGET) $(JTARGET) retroarch.cfg SDL.dll zip -r retroarch-win32-0.9.6.zip $(TARGET) $(JTARGET) retroarch.cfg SDL.dll
dist_x86_64: all dist_x86_64: all
zip -r retroarch-win64-0.9.6-rc1.zip $(TARGET) $(JTARGET) retroarch.cfg SDL.dll zip -r retroarch-win64-0.9.6.zip $(TARGET) $(JTARGET) retroarch.cfg SDL.dll
libs_x86: libs_x86:
wget https://github.com/downloads/Themaister/RetroArch/RetroArch-win32-libs.zip --no-check-certificate wget https://github.com/downloads/Themaister/RetroArch/RetroArch-win32-libs.zip --no-check-certificate

View File

@ -21,7 +21,7 @@ INCDIRS = -I. -I$(DEVKITXENON)/usr/include
OBJ = fifo_buffer.o retroarch.o driver.o file.o file_path.o settings.o message.o rewind.o movie.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o xenon/main.o xenon/xenon360_audio.o xenon/xenon360_input.o xenon/xenon360_video.o OBJ = fifo_buffer.o retroarch.o driver.o file.o file_path.o settings.o message.o rewind.o movie.o gfx/gfx_common.o patch.o compat/compat.o screenshot.o audio/hermite.o dynamic.o audio/utils.o conf/config_file.o xenon/main.o xenon/xenon360_audio.o xenon/xenon360_input.o xenon/xenon360_video.o
LIBS = -lretro -lxenon -lm -lc LIBS = -lretro -lxenon -lm -lc
DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"0.9.6-rc1\" -DRARCH_CONSOLE -DHAVE_GETOPT_LONG=1 -Dmain=rarch_main DEFINES = -std=gnu99 -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"0.9.6\" -DRARCH_CONSOLE -DHAVE_GETOPT_LONG=1 -Dmain=rarch_main
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS)
DEFINES += -u read -u _start -u exc_base DEFINES += -u read -u _start -u exc_base

View File

@ -21,7 +21,7 @@ Latest Windows binaries are currently hosted on my [homepage](http://themaister.
- GUI frontend for PC: [RetroArch-Phoenix](https://github.com/Themaister/RetroArch-Phoenix) - GUI frontend for PC: [RetroArch-Phoenix](https://github.com/Themaister/RetroArch-Phoenix)
- Cg/HLSL shaders: [common-shaders](https://github.com/twinaphex/common-shaders) - Cg/HLSL shaders: [common-shaders](https://github.com/twinaphex/common-shaders)
- More Cg shaders: [Emulator-Shader-Pack](https://github.com/Themaister/Emulator-Shader-Pack) - More Cg shaders: [Emulator-Shader-Pack](https://github.com/Themaister/Emulator-Shader-Pack)
- Helper scripts to build libretro implementations: [libretro-super](https://github.com/Themaister/libretro-super) - Helper scripts to build libretro implementations: [libretro-super](https://github.com/libretro/libretro-super)
# Philosophy # Philosophy

View File

@ -281,6 +281,11 @@ static const bool block_sram_overwrite = false;
// When the ROM is loaded, state index will be set to the highest existing value. // When the ROM is loaded, state index will be set to the highest existing value.
static const bool savestate_auto_index = false; static const bool savestate_auto_index = false;
// Automatically saves a savestate at the end of RetroArch's lifetime.
// The path is $SRAM_PATH.auto.
// RetroArch will automatically load any savestate with this path on startup.
static const bool savestate_auto_save = false;
// Slowmotion ratio. // Slowmotion ratio.
static const float slowmotion_ratio = 3.0; static const float slowmotion_ratio = 3.0;

5
configure vendored
View File

@ -2,9 +2,10 @@
echo "" echo ""
. qb/config.params.sh PACKAGE_NAME=retroarch
PACKAGE_VERSION=0.9.6
parse_input "$@" . qb/qb.params.sh
. qb/qb.comp.sh . qb/qb.comp.sh
. qb/config.libs.sh . qb/config.libs.sh

View File

@ -31,6 +31,21 @@
VIDEO VIDEO
============================================================ */ ============================================================ */
#define MIN_SCALING_FACTOR (1.0f)
#if defined(__CELLOS_LV2__)
#define MAX_SCALING_FACTOR (5.0f)
#else
#define MAX_SCALING_FACTOR (2.0f)
#endif
enum
{
FBO_DEINIT = 0,
FBO_INIT,
FBO_REINIT
};
enum aspect_ratio enum aspect_ratio
{ {
ASPECT_RATIO_1_1 = 0, ASPECT_RATIO_1_1 = 0,

View File

@ -27,11 +27,11 @@ void rarch_settings_change(unsigned setting)
switch(setting) switch(setting)
{ {
case S_ASPECT_RATIO_DECREMENT: case S_ASPECT_RATIO_DECREMENT:
if(g_console.aspect_ratio_index > 0) if(g_console.aspect_ratio_index > 0)
g_console.aspect_ratio_index--; g_console.aspect_ratio_index--;
break; break;
case S_ASPECT_RATIO_INCREMENT: case S_ASPECT_RATIO_INCREMENT:
if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO) if(g_console.aspect_ratio_index < LAST_ASPECT_RATIO)
g_console.aspect_ratio_index++; g_console.aspect_ratio_index++;
break; break;
case S_FRAME_ADVANCE: case S_FRAME_ADVANCE:
@ -57,6 +57,20 @@ void rarch_settings_change(unsigned setting)
if(g_console.overscan_amount == 0.0f) if(g_console.overscan_amount == 0.0f)
g_console.overscan_enable = 0; g_console.overscan_enable = 0;
break; break;
case S_RESOLUTION_PREVIOUS:
if (g_console.current_resolution_index)
{
g_console.current_resolution_index--;
g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index];
}
break;
case S_RESOLUTION_NEXT:
if (g_console.current_resolution_index + 1 < g_console.supported_resolutions_count)
{
g_console.current_resolution_index++;
g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index];
}
break;
case S_QUIT: case S_QUIT:
g_console.menu_enable = false; g_console.menu_enable = false;
g_console.ingame_menu_enable = false; g_console.ingame_menu_enable = false;

View File

@ -33,6 +33,8 @@ enum
S_OVERSCAN_DECREMENT, S_OVERSCAN_DECREMENT,
S_OVERSCAN_INCREMENT, S_OVERSCAN_INCREMENT,
S_QUIT, S_QUIT,
S_RESOLUTION_PREVIOUS,
S_RESOLUTION_NEXT,
S_RETURN_TO_DASHBOARD, S_RETURN_TO_DASHBOARD,
S_RETURN_TO_GAME, S_RETURN_TO_GAME,
S_RETURN_TO_LAUNCHER, S_RETURN_TO_LAUNCHER,

View File

@ -3398,3 +3398,36 @@ extern int unzSetOffset (unzFile file, unsigned long pos)
s->current_file_ok = (err == UNZ_OK); s->current_file_ok = (err == UNZ_OK);
return err; return err;
} }
int uncompress (unsigned char *dest, unsigned int *destLen, const unsigned char *source, unsigned int sourceLen)
{
z_stream stream;
int err;
stream.next_in = (unsigned char*)source;
stream.avail_in = (unsigned int)sourceLen;
/* Check for source > 64K on 16-bit machine: */
if ((unsigned int)stream.avail_in != sourceLen) return Z_BUF_ERROR;
stream.next_out = dest;
stream.avail_out = (unsigned int)*destLen;
if ((unsigned int)stream.avail_out != *destLen) return Z_BUF_ERROR;
stream.zalloc = (alloc_func)0;
stream.zfree = (free_func)0;
err = inflateInit(&stream);
if (err != Z_OK) return err;
err = inflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
inflateEnd(&stream);
if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0))
return Z_DATA_ERROR;
return err;
}
*destLen = stream.total_out;
err = inflateEnd(&stream);
return err;
}

View File

@ -177,6 +177,16 @@ Clients can connect and disconnect at any time.
Clients thus cannot interact as player 2. Clients thus cannot interact as player 2.
For spectating mode to work, both host and clients will need to use this flag. For spectating mode to work, both host and clients will need to use this flag.
.TP
\fB--command CMD\fR
Sends a command over UDP to an already running RetroArch application, and exit.
The command is formatted as "COMMAND:HOST:PORT".
HOST and PORT are both optional. "COMMAND:HOST" will set PORT to
"network_cmd_port" default setting.
If only "COMMAND" is used, HOST and PORT will be assumed to be "localhost" and "network_cmd_port" respectively.
The available commands are listed if "COMMAND" is invalid.
.TP .TP
\fB--nick NICK\fR \fB--nick NICK\fR
Pick a nickname for use with netplay. Pick a nickname for use with netplay.

View File

@ -320,6 +320,10 @@ static bool environment_cb(unsigned cmd, void *data)
g_extern.system.shutdown = true; g_extern.system.shutdown = true;
break; break;
case RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL:
g_extern.system.performance_level = *(const unsigned*)data;
break;
default: default:
RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd); RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd);
return false; return false;

View File

@ -181,6 +181,7 @@ struct settings
bool block_sram_overwrite; bool block_sram_overwrite;
bool savestate_auto_index; bool savestate_auto_index;
bool savestate_auto_save;
bool network_cmd_enable; bool network_cmd_enable;
uint16_t network_cmd_port; uint16_t network_cmd_port;
@ -329,6 +330,7 @@ struct global
unsigned rotation; unsigned rotation;
bool shutdown; bool shutdown;
unsigned performance_level;
} system; } system;
struct struct

View File

@ -309,24 +309,6 @@ void gfx_ctx_get_available_resolutions (void)
g_console.check_available_resolutions = true; g_console.check_available_resolutions = true;
} }
void ps3_next_resolution (void)
{
if (g_console.current_resolution_index + 1 < g_console.supported_resolutions_count)
{
g_console.current_resolution_index++;
g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index];
}
}
void ps3_previous_resolution (void)
{
if (g_console.current_resolution_index)
{
g_console.current_resolution_index--;
g_console.current_resolution_id = g_console.supported_resolutions[g_console.current_resolution_index];
}
}
int gfx_ctx_check_resolution(unsigned resolution_id) int gfx_ctx_check_resolution(unsigned resolution_id)
{ {
return cellVideoOutGetResolutionAvailability(CELL_VIDEO_OUT_PRIMARY, resolution_id, CELL_VIDEO_OUT_ASPECT_AUTO, 0); return cellVideoOutGetResolutionAvailability(CELL_VIDEO_OUT_PRIMARY, resolution_id, CELL_VIDEO_OUT_ASPECT_AUTO, 0);

View File

@ -338,7 +338,7 @@ error:
return false; return false;
} }
static void gl_deinit_fbo(gl_t *gl) void gl_deinit_fbo(gl_t *gl)
{ {
if (gl->fbo_inited) if (gl->fbo_inited)
{ {
@ -352,7 +352,7 @@ static void gl_deinit_fbo(gl_t *gl)
} }
} }
static void gl_init_fbo(gl_t *gl, unsigned width, unsigned height) void gl_init_fbo(gl_t *gl, unsigned width, unsigned height)
{ {
// No need to use FBOs. // No need to use FBOs.
if (!g_settings.video.render_to_texture && gl_shader_num() == 0) if (!g_settings.video.render_to_texture && gl_shader_num() == 0)

View File

@ -225,4 +225,7 @@ void gl_shader_use(unsigned index);
void gl_set_projection(gl_t *gl, struct gl_ortho *ortho, bool allow_rotate); void gl_set_projection(gl_t *gl, struct gl_ortho *ortho, bool allow_rotate);
void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full, bool allow_rotate); void gl_set_viewport(gl_t *gl, unsigned width, unsigned height, bool force_full, bool allow_rotate);
void gl_init_fbo(gl_t * gl, unsigned width, unsigned height);
void gl_deinit_fbo(gl_t *gl);
#endif #endif

View File

@ -122,6 +122,27 @@ extern "C" {
// Should only be used if game has a specific // Should only be used if game has a specific
// way to shutdown the game from a menu item or similar. // way to shutdown the game from a menu item or similar.
#define RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL 8
// const unsigned * --
// Gives a hint to the frontend how demanding this implementation
// is on a system. E.g. reporting a level of 2 means
// this implementation should run decently on all frontends
// of level 2 and up.
//
// It can be used by the frontend to potentially warn
// about too demanding implementations.
//
// The levels are "floating", but roughly defined as:
// 1: Low-powered devices such as Raspberry Pi, smart phones, tablets, etc.
// 2: Medium-spec consoles, such as PS3/360, with sub-par CPUs.
// 3: Modern desktop/laptops with reasonably powerful CPUs.
// 4: High-end desktops with very powerful CPUs.
//
// This function can be called on a per-game basis,
// as certain games an implementation can play might be
// particularily demanding.
// If called, it should be called in retro_load_game().
struct retro_message struct retro_message
{ {
const char *msg; // Message to be displayed. const char *msg; // Message to be displayed.

View File

@ -113,7 +113,7 @@
<MinimalRebuild>true</MinimalRebuild> <MinimalRebuild>true</MinimalRebuild>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.6-rc1";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.6";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling> <CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile> </ClCompile>
<Link> <Link>
@ -151,7 +151,7 @@
<PREfast>AnalyzeOnly</PREfast> <PREfast>AnalyzeOnly</PREfast>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6-rc1";_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6";_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling> <CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile> </ClCompile>
<Link> <Link>
@ -190,7 +190,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6-rc1";_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6";_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
<CallAttributedProfiling>Callcap</CallAttributedProfiling> <CallAttributedProfiling>Callcap</CallAttributedProfiling>
</ClCompile> </ClCompile>
<Link> <Link>
@ -234,7 +234,7 @@
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed> <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6-rc1";_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6";_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -275,7 +275,7 @@
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6-rc1";_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE=1;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6";_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE=1;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -316,7 +316,7 @@
<ExceptionHandling>false</ExceptionHandling> <ExceptionHandling>false</ExceptionHandling>
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6-rc1";_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions> <PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.6";_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;main=rarch_main;HAVE_CONFIGFILE;HAVE_FILEBROWSER;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9</PreprocessorDefinitions>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>

View File

@ -48,7 +48,7 @@
<PropertyGroup /> <PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|PS3'">
<ClCompile> <ClCompile>
<UserPreprocessorDefinitions>_DEBUG;__CELL_ASSERT__;HAVE_OPENGL=1;RARCH_CONSOLE;HAVE_CG=1;HAVE_CONFIGFILE=1;HAVE_NETPLAY=1;HAVE_SOCKET_LEGACY=1;PACKAGE_VERSION="0.9.6-rc1";HAVE_SCREENSHOTS_BUILTIN=1;main=rarch_main;%(UserPreprocessorDefinitions);HAVE_RARCH_MAIN_WRAP;HAVE_RSOUND;HAVE_RARCH_EXEC;HAVE_ZLIB=1;HAVE_LIBRETRO_MANAGEMENT</UserPreprocessorDefinitions> <UserPreprocessorDefinitions>_DEBUG;__CELL_ASSERT__;HAVE_OPENGL=1;RARCH_CONSOLE;HAVE_CG=1;HAVE_CONFIGFILE=1;HAVE_NETPLAY=1;HAVE_SOCKET_LEGACY=1;PACKAGE_VERSION="0.9.6";HAVE_SCREENSHOTS_BUILTIN=1;main=rarch_main;%(UserPreprocessorDefinitions);HAVE_RARCH_MAIN_WRAP;HAVE_RSOUND;HAVE_RARCH_EXEC;HAVE_ZLIB=1;HAVE_LIBRETRO_MANAGEMENT</UserPreprocessorDefinitions>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<PreprocessorDefinitions>%(UserPreprocessorDefinitions);$(BuiltInDefines);__INTELLISENSE__;%(PreprocessorDefinitions);</PreprocessorDefinitions> <PreprocessorDefinitions>%(UserPreprocessorDefinitions);$(BuiltInDefines);__INTELLISENSE__;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>
@ -60,7 +60,7 @@
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'"> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|PS3'">
<ClCompile> <ClCompile>
<UserPreprocessorDefinitions>NDEBUG;HAVE_OPENGL=1;RARCH_CONSOLE;HAVE_CG=1;HAVE_CONFIGFILE=1;HAVE_NETPLAY=1;HAVE_SOCKET_LEGACY=1;PACKAGE_VERSION="0.9.6-rc1";HAVE_SCREENSHOTS_BUILTIN=1;main="rarch_main";%(UserPreprocessorDefinitions);HAVE_RARCH_MAIN_WRAP;HAVE_RSOUND;HAVE_RARCH_EXEC;HAVE_ZLIB=1;HAVE_LIBRETRO_MANAGEMENT</UserPreprocessorDefinitions> <UserPreprocessorDefinitions>NDEBUG;HAVE_OPENGL=1;RARCH_CONSOLE;HAVE_CG=1;HAVE_CONFIGFILE=1;HAVE_NETPLAY=1;HAVE_SOCKET_LEGACY=1;PACKAGE_VERSION="0.9.6";HAVE_SCREENSHOTS_BUILTIN=1;main="rarch_main";%(UserPreprocessorDefinitions);HAVE_RARCH_MAIN_WRAP;HAVE_RSOUND;HAVE_RARCH_EXEC;HAVE_ZLIB=1;HAVE_LIBRETRO_MANAGEMENT</UserPreprocessorDefinitions>
<OptimizationLevel>Level2</OptimizationLevel> <OptimizationLevel>Level2</OptimizationLevel>
<PreprocessorDefinitions>%(UserPreprocessorDefinitions);$(BuiltInDefines);__INTELLISENSE__;%(PreprocessorDefinitions);</PreprocessorDefinitions> <PreprocessorDefinitions>%(UserPreprocessorDefinitions);$(BuiltInDefines);__INTELLISENSE__;%(PreprocessorDefinitions);</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeader>NotUsing</PrecompiledHeader>

151
netplay.c
View File

@ -233,19 +233,86 @@ static void log_connection(const struct sockaddr_storage *their_addr,
} }
#endif #endif
static int init_tcp_connection(const struct addrinfo *res, bool server, bool spectate,
struct sockaddr *other_addr, socklen_t addr_size)
{
bool ret = true;
int fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol);
if (fd < 0)
{
ret = false;
goto end;
}
if (server)
{
if (connect(fd, res->ai_addr, res->ai_addrlen) < 0)
{
ret = false;
goto end;
}
}
else if (spectate)
{
int yes = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, CONST_CAST &yes, sizeof(int));
if (bind(fd, res->ai_addr, res->ai_addrlen) < 0 ||
listen(fd, MAX_SPECTATORS) < 0)
{
ret = false;
goto end;
}
}
else
{
int yes = 1;
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, CONST_CAST &yes, sizeof(int));
if (bind(fd, res->ai_addr, res->ai_addrlen) < 0 ||
listen(fd, 1) < 0)
{
ret = false;
goto end;
}
int new_fd = accept(fd, other_addr, &addr_size);
if (new_fd < 0)
{
ret = false;
goto end;
}
close(fd);
fd = new_fd;
}
end:
if (!ret && fd >= 0)
{
close(fd);
fd = -1;
}
return fd;
}
static bool init_tcp_socket(netplay_t *handle, const char *server, uint16_t port, bool spectate) static bool init_tcp_socket(netplay_t *handle, const char *server, uint16_t port, bool spectate)
{ {
struct addrinfo hints, *res = NULL; struct addrinfo hints, *res = NULL;
memset(&hints, 0, sizeof(hints)); memset(&hints, 0, sizeof(hints));
#if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY) #if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY)
hints.ai_family = AF_INET; hints.ai_family = AF_INET;
#else #else
hints.ai_family = AF_UNSPEC; hints.ai_family = AF_UNSPEC;
#endif #endif
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
if (!server) if (!server)
hints.ai_flags = AI_PASSIVE; hints.ai_flags = AI_PASSIVE;
bool ret = false;
char port_buf[16]; char port_buf[16];
snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port); snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port);
if (getaddrinfo(server, port_buf, &hints, &res) < 0) if (getaddrinfo(server, port_buf, &hints, &res) < 0)
@ -254,75 +321,29 @@ static bool init_tcp_socket(netplay_t *handle, const char *server, uint16_t port
if (!res) if (!res)
return false; return false;
handle->fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); // If "localhost" is used, it is important to check every possible address for ipv4/ipv6.
if (handle->fd < 0) const struct addrinfo *tmp_info = res;
while (tmp_info)
{ {
RARCH_ERR("Failed to init socket...\n"); int fd;
if ((fd = init_tcp_connection(tmp_info, server, handle->spectate,
if (res) (struct sockaddr*)&handle->other_addr, sizeof(handle->other_addr))) >= 0)
freeaddrinfo(res);
return false;
}
if (server)
{
if (connect(handle->fd, res->ai_addr, res->ai_addrlen) < 0)
{ {
RARCH_ERR("Failed to connect to server.\n"); ret = true;
close(handle->fd); handle->fd = fd;
handle->fd = -1; break;
freeaddrinfo(res);
return false;
}
}
else if (handle->spectate)
{
int yes = 1;
setsockopt(handle->fd, SOL_SOCKET, SO_REUSEADDR, CONST_CAST &yes, sizeof(int));
if (bind(handle->fd, res->ai_addr, res->ai_addrlen) < 0 ||
listen(handle->fd, MAX_SPECTATORS) < 0)
{
RARCH_ERR("Failed to bind socket.\n");
close(handle->fd);
handle->fd = -1;
freeaddrinfo(res);
return false;
}
}
else
{
int yes = 1;
setsockopt(handle->fd, SOL_SOCKET, SO_REUSEADDR, CONST_CAST &yes, sizeof(int));
if (bind(handle->fd, res->ai_addr, res->ai_addrlen) < 0 ||
listen(handle->fd, 1) < 0)
{
RARCH_ERR("Failed to bind socket.\n");
close(handle->fd);
handle->fd = -1;
freeaddrinfo(res);
return false;
} }
socklen_t addr_size = sizeof(handle->other_addr); tmp_info = tmp_info->ai_next;
int new_fd = accept(handle->fd,
(struct sockaddr*)&handle->other_addr, &addr_size);
if (new_fd < 0)
{
RARCH_ERR("Failed to accept socket.\n");
close(handle->fd);
handle->fd = -1;
freeaddrinfo(res);
return false;
}
close(handle->fd);
handle->fd = new_fd;
} }
freeaddrinfo(res); if (res)
freeaddrinfo(res);
return true; if (!ret)
RARCH_ERR("Failed to set up netplay sockets.\n");
return ret;
} }
static bool init_udp_socket(netplay_t *handle, const char *server, uint16_t port) static bool init_udp_socket(netplay_t *handle, const char *server, uint16_t port)
@ -374,7 +395,7 @@ static bool init_udp_socket(netplay_t *handle, const char *server, uint16_t port
} }
// Platform specific socket library init. // Platform specific socket library init.
static bool init_network(void) bool netplay_init_network(void)
{ {
static bool inited = false; static bool inited = false;
if (inited) if (inited)
@ -400,7 +421,7 @@ static bool init_network(void)
static bool init_socket(netplay_t *handle, const char *server, uint16_t port) static bool init_socket(netplay_t *handle, const char *server, uint16_t port)
{ {
if (!init_network()) if (!netplay_init_network())
return false; return false;
if (!init_tcp_socket(handle, server, port, handle->spectate)) if (!init_tcp_socket(handle, server, port, handle->spectate))
@ -717,8 +738,6 @@ netplay_t *netplay_new(const char *server, uint16_t port,
bool spectate, bool spectate,
const char *nick) const char *nick)
{ {
(void)spectate;
if (frames > UDP_FRAME_PACKETS) if (frames > UDP_FRAME_PACKETS)
frames = UDP_FRAME_PACKETS; frames = UDP_FRAME_PACKETS;

View File

@ -41,6 +41,8 @@ struct retro_callbacks
retro_input_state_t state_cb; retro_input_state_t state_cb;
}; };
bool netplay_init_network(void);
// Creates a new netplay handle. A NULL host means we're hosting (player 1). :) // Creates a new netplay handle. A NULL host means we're hosting (player 1). :)
netplay_t *netplay_new(const char *server, netplay_t *netplay_new(const char *server,
uint16_t port, unsigned frames, uint16_t port, unsigned frames,

View File

@ -14,12 +14,17 @@
*/ */
#include "netplay_compat.h" #include "netplay_compat.h"
#include "netplay.h"
#include "network_cmd.h" #include "network_cmd.h"
#include "driver.h" #include "driver.h"
#include "general.h" #include "general.h"
#include "compat/strl.h"
#include "compat/posix_string.h"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#define DEFAULT_NETWORK_CMD_PORT 55355
struct network_cmd struct network_cmd
{ {
int fd; int fd;
@ -38,10 +43,15 @@ static bool socket_nonblock(int fd)
network_cmd_t *network_cmd_new(uint16_t port) network_cmd_t *network_cmd_new(uint16_t port)
{ {
if (!netplay_init_network())
return NULL;
network_cmd_t *handle = (network_cmd_t*)calloc(1, sizeof(*handle)); network_cmd_t *handle = (network_cmd_t*)calloc(1, sizeof(*handle));
if (!handle) if (!handle)
return NULL; return NULL;
RARCH_LOG("Bringing up command interface on port %hu.\n", (unsigned short)port);
handle->fd = -1; handle->fd = -1;
struct addrinfo hints, *res = NULL; struct addrinfo hints, *res = NULL;
@ -76,7 +86,6 @@ network_cmd_t *network_cmd_new(uint16_t port)
} }
freeaddrinfo(res); freeaddrinfo(res);
return handle; return handle;
error: error:
@ -190,3 +199,114 @@ void network_cmd_pre_frame(network_cmd_t *handle)
} }
} }
static bool send_udp_packet(const char *host, uint16_t port, const char *msg)
{
struct addrinfo hints, *res = NULL;
memset(&hints, 0, sizeof(hints));
#if defined(_WIN32) || defined(HAVE_SOCKET_LEGACY)
hints.ai_family = AF_INET;
#else
hints.ai_family = AF_UNSPEC;
#endif
hints.ai_socktype = SOCK_DGRAM;
int fd = -1;
bool ret = true;
char port_buf[16];
snprintf(port_buf, sizeof(port_buf), "%hu", (unsigned short)port);
if (getaddrinfo(host, port_buf, &hints, &res) < 0)
return false;
// Send to all possible targets.
// "localhost" might resolve to several different IPs.
const struct addrinfo *tmp = res;
while (tmp)
{
fd = socket(tmp->ai_family, tmp->ai_socktype, tmp->ai_protocol);
if (fd < 0)
{
ret = false;
goto end;
}
ssize_t len = strlen(msg);
ssize_t ret = sendto(fd, msg, len, 0, tmp->ai_addr, tmp->ai_addrlen);
if (ret < len)
{
ret = false;
goto end;
}
close(fd);
fd = -1;
tmp = tmp->ai_next;
}
end:
freeaddrinfo(res);
if (fd >= 0)
close(fd);
return ret;
}
static bool verify_command(const char *cmd)
{
for (unsigned i = 0; i < sizeof(map) / sizeof(map[0]); i++)
{
if (strcmp(map[i].str, cmd) == 0)
return true;
}
RARCH_ERR("Command \"%s\" is not recognized by RetroArch.\n", cmd);
RARCH_ERR("\tValid commands:\n");
for (unsigned i = 0; i < sizeof(map) / sizeof(map[0]); i++)
RARCH_ERR("\t\t%s\n", map[i].str);
return false;
}
bool network_cmd_send(const char *cmd_)
{
if (!netplay_init_network())
return NULL;
char *command = strdup(cmd_);
if (!command)
return false;
bool old_verbose = g_extern.verbose;
g_extern.verbose = true;
const char *cmd = NULL;
const char *host = NULL;
const char *port_ = NULL;
uint16_t port = DEFAULT_NETWORK_CMD_PORT;
cmd = strtok(command, ":");
if (cmd)
host = strtok(NULL, ":");
if (host)
port_ = strtok(NULL, ":");
if (!host)
{
#ifdef _WIN32
host = "127.0.0.1";
#else
host = "localhost";
#endif
}
if (port_)
port = strtoul(port_, NULL, 0);
RARCH_LOG("Sending command: \"%s\" to %s:%hu\n", cmd, host, (unsigned short)port);
bool ret = verify_command(cmd) && send_udp_packet(host, port, cmd);
free(command);
g_extern.verbose = old_verbose;
return ret;
}

View File

@ -28,5 +28,7 @@ void network_cmd_pre_frame(network_cmd_t *handle);
void network_cmd_set(network_cmd_t *handle, unsigned id); void network_cmd_set(network_cmd_t *handle, unsigned id);
bool network_cmd_get(network_cmd_t *handle, unsigned id); bool network_cmd_get(network_cmd_t *handle, unsigned id);
bool network_cmd_send(const char *cmd);
#endif #endif

View File

@ -40,7 +40,6 @@
#include <np/drm.h> #include <np/drm.h>
#include "ps3_input.h" #include "ps3_input.h"
#include "ps3_video_psgl.h"
#include "../console/console_ext.h" #include "../console/console_ext.h"
#include "../conf/config_file.h" #include "../conf/config_file.h"

View File

@ -28,7 +28,6 @@
#include "../console/console_ext.h" #include "../console/console_ext.h"
#include "ps3_video_psgl.h"
#include "../gfx/gl_common.h" #include "../gfx/gl_common.h"
#include "shared.h" #include "shared.h"
@ -148,6 +147,9 @@ static menu menu_controlssettings = {
items_generalsettings /* items */ items_generalsettings /* items */
}; };
//forward decls
extern const char *ps3_get_resolution_label(unsigned resolution);
static void display_menubar(uint32_t menu_enum) static void display_menubar(uint32_t menu_enum)
{ {
gl_t *gl = driver.video_data; gl_t *gl = driver.video_data;
@ -1169,12 +1171,12 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
case SETTING_CHANGE_RESOLUTION: case SETTING_CHANGE_RESOLUTION:
if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) ) if(CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state) )
{ {
ps3_next_resolution(); rarch_settings_change(S_RESOLUTION_NEXT);
set_delay = DELAY_SMALL; set_delay = DELAY_SMALL;
} }
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) ) if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) )
{ {
ps3_previous_resolution(); rarch_settings_change(S_RESOLUTION_PREVIOUS);
set_delay = DELAY_SMALL; set_delay = DELAY_SMALL;
} }
if(CTRL_CROSS(state)) if(CTRL_CROSS(state))

View File

@ -24,9 +24,8 @@
#include <sysutil/sysutil_common.h> #include <sysutil/sysutil_common.h>
#include "ps3_input.h" #include "ps3_input.h"
#include "ps3_video_psgl.h"
#include "../driver.h" #include "../driver.h"
#include "../console/console_ext_input.h" #include "../console/console_ext.h"
#include "../libretro.h" #include "../libretro.h"
#include "../general.h" #include "../general.h"
#include "shared.h" #include "shared.h"

View File

@ -1,48 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
* Copyright (C) 2011-2012 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PS3_VIDEO_PSGL_H
#define _PS3_VIDEO_PSGL_H
#include "../gfx/gl_common.h"
#include "../gfx/gfx_common.h"
#include "../gfx/image.h"
#include "../console/console_ext.h"
enum
{
FBO_DEINIT = 0,
FBO_INIT,
FBO_REINIT
};
#define MIN_SCALING_FACTOR (1.0f)
#define MAX_SCALING_FACTOR (4.0f)
const char * ps3_get_resolution_label(uint32_t resolution);
void ps3_previous_resolution (void);
void ps3_next_resolution (void);
void gl_deinit_fbo(gl_t * gl);
void gl_init_fbo(gl_t * gl, unsigned width, unsigned height);
bool gl_cg_reinit(const char *path);
bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info);
bool gl_cg_load_shader(unsigned index, const char *path);
unsigned gl_cg_get_lut_info(struct gl_cg_lut_info *info, unsigned elems);
#endif

View File

@ -25,7 +25,7 @@ else
HAVE_RPI=no HAVE_RPI=no
fi fi
if [ $OS = BSD ]; then if [ "$OS" = BSD ]; then
DYLIB=-lc DYLIB=-lc
else else
DYLIB=-ldl DYLIB=-ldl
@ -38,7 +38,7 @@ else
HAVE_DYNAMIC=no HAVE_DYNAMIC=no
fi fi
if [ $HAVE_DYNAMIC != yes ]; then if [ "$HAVE_DYNAMIC" != yes ]; then
check_lib_cxx RETRO $LIBRETRO retro_init $DYLIB check_lib_cxx RETRO $LIBRETRO retro_init $DYLIB
check_critical RETRO "Cannot find libretro." check_critical RETRO "Cannot find libretro."
add_define_make libretro $LIBRETRO add_define_make libretro $LIBRETRO
@ -48,10 +48,10 @@ check_lib THREADS -lpthread pthread_create
check_lib DYLIB $DYLIB dlopen check_lib DYLIB $DYLIB dlopen
check_lib NETPLAY -lc socket check_lib NETPLAY -lc socket
if [ $HAVE_NETPLAY = yes ]; then if [ "$HAVE_NETPLAY" = yes ]; then
HAVE_GETADDRINFO=auto HAVE_GETADDRINFO=auto
check_lib GETADDRINFO -lc getaddrinfo check_lib GETADDRINFO -lc getaddrinfo
if [ $HAVE_GETADDRINFO = yes ]; then if [ "$HAVE_GETADDRINFO" = yes ]; then
HAVE_SOCKET_LEGACY=no HAVE_SOCKET_LEGACY=no
else else
HAVE_SOCKET_LEGACY=yes HAVE_SOCKET_LEGACY=yes
@ -61,10 +61,9 @@ else
HAVE_NETWORK_CMD=no HAVE_NETWORK_CMD=no
fi fi
check_lib GETOPT_LONG -lc getopt_long check_lib GETOPT_LONG -lc getopt_long
if [ $HAVE_DYLIB = no ] && [ $HAVE_DYNAMIC = yes ]; then if [ "$HAVE_DYLIB" = no ] && [ "$HAVE_DYNAMIC" = yes ]; then
echo "Dynamic loading of libsnes is enabled, but your platform does not appear to have dlopen(), use --disable-dynamic or --with-libsnes=\"-lsnes\"". echo "Dynamic loading of libsnes is enabled, but your platform does not appear to have dlopen(), use --disable-dynamic or --with-libsnes=\"-lsnes\"".
exit 1 exit 1
fi fi
@ -74,13 +73,13 @@ check_header OSS sys/soundcard.h
check_header OSS_BSD soundcard.h check_header OSS_BSD soundcard.h
check_lib OSS_LIB -lossaudio check_lib OSS_LIB -lossaudio
if [ $OS = Darwin ]; then if [ "$OS" = Darwin ]; then
check_lib AL "-framework OpenAL" alcOpenDevice check_lib AL "-framework OpenAL" alcOpenDevice
else else
check_lib AL -lopenal alcOpenDevice check_lib AL -lopenal alcOpenDevice
fi fi
if [ $OS = Darwin ]; then if [ "$OS" = Darwin ]; then
check_lib FBO "-framework OpenGL" glFramebufferTexture2D check_lib FBO "-framework OpenGL" glFramebufferTexture2D
else else
check_lib FBO -lGL glFramebufferTexture2D check_lib FBO -lGL glFramebufferTexture2D
@ -97,7 +96,7 @@ check_pkgconf SDL sdl 1.2.10
check_critical SDL "Cannot find SDL library." check_critical SDL "Cannot find SDL library."
# On some distros, -lCg doesn't link against -lstdc++ it seems ... # On some distros, -lCg doesn't link against -lstdc++ it seems ...
if [ $HAVE_OPENGL != no ]; then if [ "$HAVE_OPENGL" != no ]; then
check_lib_cxx CG -lCg cgCreateContext check_lib_cxx CG -lCg cgCreateContext
else else
echo "Ignoring Cg. OpenGL is not enabled." echo "Ignoring Cg. OpenGL is not enabled."
@ -107,17 +106,17 @@ fi
check_pkgconf XML libxml-2.0 check_pkgconf XML libxml-2.0
check_pkgconf SDL_IMAGE SDL_image check_pkgconf SDL_IMAGE SDL_image
if [ $HAVE_THREADS != no ]; then if [ "$HAVE_THREADS" != no ]; then
if [ $HAVE_FFMPEG != no ]; then if [ "$HAVE_FFMPEG" != no ]; then
check_pkgconf AVCODEC libavcodec check_pkgconf AVCODEC libavcodec
check_pkgconf AVFORMAT libavformat check_pkgconf AVFORMAT libavformat
check_pkgconf AVUTIL libavutil check_pkgconf AVUTIL libavutil
check_pkgconf SWSCALE libswscale check_pkgconf SWSCALE libswscale
( [ $HAVE_FFMPEG = auto ] && ( [ $HAVE_AVCODEC = no ] || [ $HAVE_AVFORMAT = no ] || [ $HAVE_AVUTIL = no ] || [ $HAVE_SWSCALE = no ] ) && HAVE_FFMPEG=no ) || HAVE_FFMPEG=yes ( [ "$HAVE_FFMPEG" = auto ] && ( [ "$HAVE_AVCODEC" = no ] || [ "$HAVE_AVFORMAT" = no ] || [ "$HAVE_AVUTIL" = no ] || [ "$HAVE_SWSCALE" = no ] ) && HAVE_FFMPEG=no ) || HAVE_FFMPEG=yes
fi fi
if [ $HAVE_FFMPEG = yes ]; then if [ "$HAVE_FFMPEG" = yes ]; then
check_lib FFMPEG_ALLOC_CONTEXT3 "$AVCODEC_LIBS" avcodec_alloc_context3 check_lib FFMPEG_ALLOC_CONTEXT3 "$AVCODEC_LIBS" avcodec_alloc_context3
check_lib FFMPEG_AVCODEC_OPEN2 "$AVCODEC_LIBS" avcodec_open2 check_lib FFMPEG_AVCODEC_OPEN2 "$AVCODEC_LIBS" avcodec_open2
check_lib FFMPEG_AVCODEC_ENCODE_AUDIO2 "$AVCODEC_LIBS" avcodec_encode_audio2 check_lib FFMPEG_AVCODEC_ENCODE_AUDIO2 "$AVCODEC_LIBS" avcodec_encode_audio2
@ -127,7 +126,7 @@ if [ $HAVE_THREADS != no ]; then
check_lib FFMPEG_AVCODEC_ENCODE_VIDEO2 "$AVCODEC_LIBS" avcodec_encode_video2 check_lib FFMPEG_AVCODEC_ENCODE_VIDEO2 "$AVCODEC_LIBS" avcodec_encode_video2
fi fi
if [ $HAVE_FFMPEG = no ] && [ $HAVE_X264RGB = yes ]; then if [ "$HAVE_FFMPEG" = no ] && [ "$HAVE_X264RGB" = yes ]; then
echo "x264 RGB recording is enabled, but FFmpeg is not. --enable-x264rgb will not have any effect." echo "x264 RGB recording is enabled, but FFmpeg is not. --enable-x264rgb will not have any effect."
fi fi
else else
@ -140,7 +139,7 @@ check_lib DYNAMIC $DYLIB dlopen
check_pkgconf FREETYPE freetype2 check_pkgconf FREETYPE freetype2
check_pkgconf X11 x11 check_pkgconf X11 x11
check_pkgconf XEXT xext check_pkgconf XEXT xext
if [ $HAVE_X11 = yes ] && [ $HAVE_XEXT = yes ]; then if [ "$HAVE_X11" = yes ] && [ "$HAVE_XEXT" = yes ]; then
check_pkgconf XVIDEO xv check_pkgconf XVIDEO xv
else else
echo "X11 or Xext not present. Skipping XVideo." echo "X11 or Xext not present. Skipping XVideo."

View File

@ -1,35 +1,26 @@
. qb/qb.params.sh HAVE_DYNAMIC=yes # Disable dynamic loading of libsnes library
HAVE_LIBRETRO= # libretro library used
PACKAGE_NAME=ssnes HAVE_THREADS=auto # Threading support
PACKAGE_VERSION=0.9.6-rc1 HAVE_FFMPEG=auto # Enable FFmpeg recording support
HAVE_X264RGB=no # Enable lossless X264 RGB recording
# Adds a command line opt to ./configure --help HAVE_DYLIB=auto # Enable dynamic loading support
# $1: Variable (HAVE_ALSA, HAVE_OSS, etc) HAVE_NETPLAY=auto # Enable netplay support
# $2: Comment HAVE_CONFIGFILE=yes # Disable support for config file
# $3: Default arg. auto implies that HAVE_ALSA will be set according to library checks later on. HAVE_OPENGL=yes # Disable OpenGL support
add_command_line_enable DYNAMIC "Disable dynamic loading of libsnes library" yes HAVE_CG=auto # Enable Cg shader support
add_command_line_string LIBRETRO "libretro library used" "" HAVE_XML=auto # Enable bSNES-style XML shader support
add_command_line_enable THREADS "Threading support" auto HAVE_FBO=auto # Enable render-to-texture (FBO) support
add_command_line_enable FFMPEG "Enable FFmpeg recording support" auto HAVE_ALSA=auto # Enable ALSA support
add_command_line_enable X264RGB "Enable lossless X264 RGB recording" no HAVE_OSS=auto # Enable OSS support
add_command_line_enable DYLIB "Enable dynamic loading support" auto HAVE_RSOUND=auto # Enable RSound support
add_command_line_enable NETPLAY "Enable netplay support" auto HAVE_ROAR=auto # Enable RoarAudio support
add_command_line_enable CONFIGFILE "Disable support for config file" yes HAVE_AL=auto # Enable OpenAL support
add_command_line_enable OPENGL "Disable OpenGL support" yes HAVE_JACK=auto # Enable JACK support
add_command_line_enable CG "Enable Cg shader support" auto HAVE_COREAUDIO=auto # Enable CoreAudio support
add_command_line_enable XML "Enable bSNES-style XML shader support" auto HAVE_PULSE=auto # Enable PulseAudio support
add_command_line_enable FBO "Enable render-to-texture (FBO) support" auto HAVE_FREETYPE=auto # Enable FreeType support
add_command_line_enable ALSA "Enable ALSA support" auto HAVE_XVIDEO=auto # Enable XVideo support
add_command_line_enable OSS "Enable OSS support" auto HAVE_SDL_IMAGE=auto # Enable SDL_image support
add_command_line_enable RSOUND "Enable RSound support" auto HAVE_PYTHON=auto # Enable Python 3 support for shaders
add_command_line_enable ROAR "Enable RoarAudio support" auto HAVE_SINC=yes # Disable SINC resampler
add_command_line_enable AL "Enable OpenAL support" auto HAVE_BSV_MOVIE=yes # Disable BSV movie support
add_command_line_enable JACK "Enable JACK support" auto
add_command_line_enable COREAUDIO "Enable CoreAudio support" auto
add_command_line_enable PULSE "Enable PulseAudio support" auto
add_command_line_enable FREETYPE "Enable FreeType support" auto
add_command_line_enable XVIDEO "Enable XVideo support" auto
add_command_line_enable SDL_IMAGE "Enable SDL_image support" auto
add_command_line_enable PYTHON "Enable Python 3 support for shaders" auto
add_command_line_enable SINC "Disable SINC resampler" yes
add_command_line_enable BSV_MOVIE "Disable BSV movie support" yes

View File

@ -41,7 +41,7 @@ if [ "$USE_LANG_C" = yes ]; then
rm -rf $TEMP_C $TEMP_EXE rm -rf $TEMP_C $TEMP_EXE
[ $answer = no ] && echo "Can't find suitable C compiler. Exiting ..." && exit 1 [ "$answer" = no ] && echo "Can't find suitable C compiler. Exiting ..." && exit 1
fi fi
# Checking for working C++ compiler # Checking for working C++ compiler
@ -64,6 +64,6 @@ if [ "$USE_LANG_CXX" = "yes" ]; then
rm -rf $TEMP_CXX $TEMP_EXE rm -rf $TEMP_CXX $TEMP_EXE
[ $answer = no ] && echo "Can't find suitable C++ compiler. Exiting ..." && exit 1 [ "$answer" = no ] && echo "Can't find suitable C++ compiler. Exiting ..." && exit 1
fi fi

View File

@ -1,153 +1,79 @@
COMMAND_LINE_OPTS_ENABLE=""
add_command_line_enable()
{
COMMAND_LINE_OPTS_ENABLE="$COMMAND_LINE_OPTS_ENABLE:\"$1\" \"$2\" \"$3\":"
eval HAVE_$1=$3
}
add_command_line_string()
{
COMMAND_LINE_OPTS_STRINGS="$COMMAND_LINE_OPTS_STRINGS:\"$1\" \"$2\" \"$3\":"
eval $1=$3
}
## lvl. 43 regex dragon awaits thee. ## lvl. 43 regex dragon awaits thee.
print_help() print_help()
{ { cat << EOF
echo "====================" ====================
echo " Quickbuild script" Quickbuild script
echo "====================" ====================
echo "Package: $PACKAGE_NAME" Package: $PACKAGE_NAME
echo "Version: $PACKAGE_VERSION" Version: $PACKAGE_VERSION
echo ""
echo "General environment variables:"
echo "CC: C compiler"
echo "CFLAGS: C compiler flags"
echo "CXX: C++ compiler"
echo "CXXFLAGS: C++ compiler flags"
echo "LDFLAGS: Linker flags"
echo ""
echo "General options:"
echo "--prefix=\$path: Install path prefix"
echo "--help: Show this help"
echo ""
echo "Custom options:"
tmpopts="$COMMAND_LINE_OPTS_ENABLE" General environment variables:
while [ ! -z "$tmpopts" ] CC: C compiler
do CFLAGS: C compiler flags
subopts="`echo $tmpopts | sed 's|^:"\([^"]*\)"."\([^"]*\)"."\([^"]*\)":.*$|"\1":"\2":"\3"|'`" CXX: C++ compiler
tmpopts="`echo $tmpopts | sed 's|^\W*$||'`" CXXFLAGS: C++ compiler flags
tmpopts="`echo $tmpopts | sed 's|^:"[^"]*"."[^"]*"."[^"]*":||'`" LDFLAGS: Linker flags
print_sub_opt "$subopts"
done
echo "" General options:
--prefix=\$path: Install path prefix
--help: Show this help
tmpopts="$COMMAND_LINE_OPTS_STRINGS" Custom options:
while [ ! -z "$tmpopts" ] EOF
do while IFS='=#' read VAR VAL COMMENT; do
subopts="`echo $tmpopts | sed 's|^:"\([^"]*\)"."\([^"]*\)"."\([^"]*\)":.*$|"\1":"\2":"\3"|'`" VAR=$(echo "${VAR##HAVE_}" | tr '[A-Z]' '[a-z]')
tmpopts="`echo $tmpopts | sed 's|^\W*$||'`" case "$VAL" in
tmpopts="`echo $tmpopts | sed 's|^:"[^"]*"."[^"]*"."[^"]*":||'`" 'yes'*) echo "--disable-$VAR: $COMMENT";;
print_sub_str_opt "$subopts" 'no'*) echo "--enable-$VAR: $COMMENT";;
done 'auto'*) echo "--enable-$VAR: $COMMENT"; echo "--disable-$VAR";;
*) echo "--with-$VAR: $COMMENT";;
esac
done < 'qb/config.params.sh'
} }
print_sub_opt() opt_exists() # $opt is returned if exists in OPTS
{ {
arg1="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\1|'`" opt=$(echo "$1" | tr '[a-z]' '[A-Z]')
arg2="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\2|'`" for OPT in $OPTS; do [ "$opt" = "$OPT" ] && return; done
arg3="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\3|'`" print_help; exit 1
lowertext="`echo $arg1 | tr '[A-Z]' '[a-z]'`"
if [ "$arg3" = "auto" ]; then
echo "--enable-$lowertext: $arg2"
echo "--disable-$lowertext"
elif [ "$arg3" = "yes" ]; then
echo "--disable-$lowertext: $arg2"
elif [ "$arg3" = "no" ]; then
echo "--enable-$lowertext: $arg2"
fi
} }
print_sub_str_opt() parse_input() # Parse stuff :V
{ {
arg1="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\1|'`" #OPTS contains all available options in config.params.sh
arg2="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\2|'`" while IFS='=' read VAR dummy; do OPTS="$OPTS ${VAR##HAVE_}"; done < 'qb/config.params.sh'
arg3="`echo $1 | sed 's|^"\([^"]*\)":"\([^"]*\)":"\([^"]*\)"$|\3|'`"
while [ "$1" ]; do
case "$1" in
--prefix=*) PREFIX=${1##--prefix=};;
lowertext="`echo $arg1 | tr '[A-Z]' '[a-z]'`" --enable-*)
opt_exists "${1##--enable-}" "$OPTS"
eval "HAVE_$opt=yes"
;;
echo "--with-$lowertext: $arg2" --disable-*)
opt_exists "${1##--disable-}" "$OPTS"
eval "HAVE_$opt=no"
;;
--with-*)
arg=${1##--with-}
val=${arg##*=}
opt_exists "${arg%%=*}" "$OPTS"
eval "$opt=$val"
;;
-h|--help) print_help; exit 0;;
*) print_help; exit 1;;
esac
shift
done
} }
parse_input() . qb/config.params.sh
{
### Parse stuff :V
while [ ! -z "$1" ]
do
case "$1" in
--prefix=*)
prefix="`echo $1 | sed -e 's|^--prefix=||' -e 's|^\(.*\)/$|\1|'`"
if [ "$prefix" != "$1" ]; then
PREFIX="$prefix"
fi
;;
--enable-*)
tmp="$1"
enable="${tmp#--enable-}"
if [ -z "`echo $COMMAND_LINE_OPTS_ENABLE | grep -i -- $enable`" ]; then
print_help
exit 1
fi
eval HAVE_`echo $enable | tr '[a-z]' '[A-Z]'`=yes
;;
--disable-*)
tmp="$1"
disable="${tmp#--disable-}"
if [ -z "`echo $COMMAND_LINE_OPTS_ENABLE | grep -i -- $disable`" ]; then
print_help
exit 1
fi
eval HAVE_`echo $disable | tr '[a-z]' '[A-Z]'`=no
;;
--with-*)
tmp="$1"
arg="${tmp#--with-*=}"
tmp="${tmp#--with-}"
with="${tmp%%=*}"
if [ -z "`echo $COMMAND_LINE_OPTS_STRINGS | grep -i -- $with`" ]; then
print_help
exit 1
fi
eval "`echo $with | tr '[a-z]' '[A-Z]'`=\"$arg\""
;;
-h|--help)
print_help
exit 0
;;
*)
print_help
exit 1
;;
esac
shift
done
}
parse_input "$@"

View File

@ -543,6 +543,10 @@ static void print_help(void)
puts("\t\tHowever, the client will not be able to play. Multiple clients can connect to the host."); puts("\t\tHowever, the client will not be able to play. Multiple clients can connect to the host.");
puts("\t--nick: Picks a nickname for use with netplay. Not mandatory."); puts("\t--nick: Picks a nickname for use with netplay. Not mandatory.");
#endif #endif
#ifdef HAVE_NETWORK_CMD
puts("\t--command: Sends a command over UDP to an already running RetroArch process.");
puts("\t\tAvailable commands are listed if command is invalid.");
#endif
#ifdef HAVE_FFMPEG #ifdef HAVE_FFMPEG
puts("\t-r/--record: Path to record video file.\n\t\tUsing .mkv extension is recommended."); puts("\t-r/--record: Path to record video file.\n\t\tUsing .mkv extension is recommended.");
@ -699,6 +703,9 @@ static void parse_input(int argc, char *argv[])
{ "port", 1, &val, 'p' }, { "port", 1, &val, 'p' },
{ "spectate", 0, &val, 'S' }, { "spectate", 0, &val, 'S' },
{ "nick", 1, &val, 'N' }, { "nick", 1, &val, 'N' },
#endif
#ifdef HAVE_NETWORK_CMD
{ "command", 1, &val, 'c' },
#endif #endif
{ "ups", 1, NULL, 'U' }, { "ups", 1, NULL, 'U' },
{ "bps", 1, &val, 'B' }, { "bps", 1, &val, 'B' },
@ -896,8 +903,6 @@ static void parse_input(int argc, char *argv[])
case 'F': case 'F':
g_extern.netplay_sync_frames = strtol(optarg, NULL, 0); g_extern.netplay_sync_frames = strtol(optarg, NULL, 0);
if (g_extern.netplay_sync_frames > 16)
g_extern.netplay_sync_frames = 16;
break; break;
#endif #endif
@ -933,6 +938,15 @@ static void parse_input(int argc, char *argv[])
break; break;
#endif #endif
#ifdef HAVE_NETWORK_CMD
case 'c':
if (network_cmd_send(optarg))
exit(0);
else
rarch_fail(1, "network_cmd_send()");
break;
#endif
case 'B': case 'B':
strlcpy(g_extern.bps_name, optarg, sizeof(g_extern.bps_name)); strlcpy(g_extern.bps_name, optarg, sizeof(g_extern.bps_name));
g_extern.bps_pref = true; g_extern.bps_pref = true;
@ -1624,14 +1638,28 @@ static void load_auto_state(void)
if (path_file_exists(savestate_name_auto)) if (path_file_exists(savestate_name_auto))
{ {
RARCH_LOG("Found auto savestate in: %s\n", savestate_name_auto); RARCH_LOG("Found auto savestate in: %s\n", savestate_name_auto);
load_state(savestate_name_auto); bool ret = load_state(savestate_name_auto);
char msg[PATH_MAX]; char msg[PATH_MAX];
snprintf(msg, sizeof(msg), "Auto-loaded savestate from: \"%s\"", savestate_name_auto); snprintf(msg, sizeof(msg), "Auto-loading savestate from \"%s\" %s.", savestate_name_auto, ret ? "succeeded" : "failed");
msg_queue_push(g_extern.msg_queue, msg, 1, 180); msg_queue_push(g_extern.msg_queue, msg, 1, 180);
RARCH_LOG("%s\n", msg);
} }
} }
static void save_auto_state(void)
{
if (!g_settings.savestate_auto_save)
return;
char savestate_name_auto[PATH_MAX];
fill_pathname_noext(savestate_name_auto, g_extern.savestate_name,
".auto", sizeof(savestate_name_auto));
bool ret = save_state(savestate_name_auto);
RARCH_LOG("Auto save state to \"%s\" %s.\n", savestate_name_auto, ret ? "succeeded" : "failed");
}
void rarch_load_state(void) void rarch_load_state(void)
{ {
char load_path[PATH_MAX]; char load_path[PATH_MAX];
@ -2548,6 +2576,8 @@ void rarch_main_deinit(void)
deinit_movie(); deinit_movie();
#endif #endif
save_auto_state();
pretro_unload_game(); pretro_unload_game();
pretro_deinit(); pretro_deinit();
uninit_drivers(); uninit_drivers();

View File

@ -8,6 +8,11 @@
# This will be overridden by explicit command line options. # This will be overridden by explicit command line options.
# savestate_directory = # savestate_directory =
# Automatically saves a savestate at the end of RetroArch's lifetime.
# The path is $SRAM_PATH.auto.
# RetroArch will automatically load any savestate with this path on startup.
# savestate_auto_save = false
# Load libretro from a dynamic location for dynamically built RetroArch. # Load libretro from a dynamic location for dynamically built RetroArch.
# This option is mandatory. # This option is mandatory.
# libretro_path = "/path/to/libretro.so" # libretro_path = "/path/to/libretro.so"

View File

@ -193,6 +193,7 @@ void config_set_defaults(void)
g_settings.block_sram_overwrite = block_sram_overwrite; g_settings.block_sram_overwrite = block_sram_overwrite;
g_settings.savestate_auto_index = savestate_auto_index; g_settings.savestate_auto_index = savestate_auto_index;
g_settings.savestate_auto_save = savestate_auto_save;
g_settings.network_cmd_enable = network_cmd_enable; g_settings.network_cmd_enable = network_cmd_enable;
g_settings.network_cmd_port = network_cmd_port; g_settings.network_cmd_port = network_cmd_port;
@ -462,6 +463,7 @@ bool config_load_file(const char *path)
CONFIG_GET_BOOL(block_sram_overwrite, "block_sram_overwrite"); CONFIG_GET_BOOL(block_sram_overwrite, "block_sram_overwrite");
CONFIG_GET_BOOL(savestate_auto_index, "savestate_auto_index"); CONFIG_GET_BOOL(savestate_auto_index, "savestate_auto_index");
CONFIG_GET_BOOL(savestate_auto_save, "savestate_auto_save");
CONFIG_GET_BOOL(network_cmd_enable, "network_cmd_enable"); CONFIG_GET_BOOL(network_cmd_enable, "network_cmd_enable");
CONFIG_GET_INT(network_cmd_port, "network_cmd_port"); CONFIG_GET_INT(network_cmd_port, "network_cmd_port");

View File

@ -71,6 +71,10 @@ static struct bind binds[] = {
BIND("Y button (left)", y) BIND("Y button (left)", y)
BIND("L button (left shoulder)", l) BIND("L button (left shoulder)", l)
BIND("R button (right shoulder)", r) BIND("R button (right shoulder)", r)
BIND("L2 button (left shoulder #2)", l2)
BIND("R2 button (right shoulder #2)", r2)
BIND("L3 button (left analog button)", l3)
BIND("R3 button (right analog button)", r3)
BIND("Start button", start) BIND("Start button", start)
BIND("Select button", select) BIND("Select button", select)
BIND("Left D-pad", left) BIND("Left D-pad", left)

View File

@ -2,7 +2,7 @@
<app version="1"> <app version="1">
<name>RetroArch Wii</name> <name>RetroArch Wii</name>
<coder>Themaister, Squarepusher2</coder> <coder>Themaister, Squarepusher2</coder>
<version>0.9.6-rc1</version> <version>0.9.6</version>
<release_date>2012</release_date> <release_date>2012</release_date>
<short_description>Multi-system emulator</short_description> <short_description>Multi-system emulator</short_description>
<long_description>A port of RetroArch to the Wii.</long_description> <long_description>A port of RetroArch to the Wii.</long_description>