mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-26 04:36:56 +00:00
Merge branch 'master' of https://github.com/Themaister/RetroArch into ios
This commit is contained in:
commit
06bb6b7840
3
Makefile
3
Makefile
@ -77,9 +77,8 @@ ifneq ($(findstring Linux,$(OS)),)
|
||||
JOYCONFIG_OBJ += input/linuxraw_joypad.o
|
||||
endif
|
||||
|
||||
OBJ += autosave.o thread.o
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += autosave.o thread.o gfx/thread_wrapper.o
|
||||
ifeq ($(findstring Haiku,$(OS)),)
|
||||
LIBS += -lpthread
|
||||
endif
|
||||
|
@ -53,7 +53,7 @@ CFLAGS += -DHAVE_FILE_LOGGER
|
||||
CFLAGS += -Iconsole/logger
|
||||
endif
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
|
||||
CFLAGS += -std=gnu99 -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RGUI -DRARCH_CONSOLE -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
|
@ -109,7 +109,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_RMENU_GUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
DEFINES += -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RMENU -DHAVE_THREADS -DHAVE_RMENU_GUI -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_VID_CONTEXT -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FILEBROWSER -DHAVE_FBO -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_SINC -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_OSKUTIL -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
|
@ -92,7 +92,7 @@ endif
|
||||
|
||||
RSXGL_DEFINES = -D__RSX__ -DGL3_PROTOTYPES
|
||||
|
||||
SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.8\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts
|
||||
SHARED_FLAGS := -DHAVE_FILEBROWSER $(RSXGL_DEFINES) -DHAVE_OPENGL -DHAVE_EGL -DHAVE_OPENGL_MODERN -DHAVE_GLSL -DHAVE_VID_CONTEXT -DHAVE_FBO -DHAVE_MOUSE -DHAVE_DEFAULT_RETROPAD_INPUT -DRARCH_CONSOLE -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_GRIFFIN=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DPACKAGE_VERSION=\"0.9.8\" -Dmain=rarch_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
@ -8,7 +8,7 @@ INCDIR =
|
||||
CFLAGS = -O2 -G0 -g -std=gnu99 -ffast-math
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO -DHAVE_RMENU
|
||||
RARCH_DEFINES = -DPSP -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_FILEBROWSER -DHAVE_RARCH_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -DHAVE_NULLVIDEO -DHAVE_NULLAUDIO -DHAVE_RMENU
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
CFLAGS += -DHAVE_FILE_LOGGER
|
||||
|
@ -61,7 +61,7 @@ CFLAGS += -Iconsole/logger
|
||||
endif
|
||||
|
||||
|
||||
CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DHAVE_THREAD -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_RZLIB -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
|
||||
CFLAGS += -std=gnu99 -DHAVE_SINC -DSINC_LOWER_QUALITY -DHAVE_DEFAULT_RETROPAD_INPUT -DHAVE_RGUI -DRARCH_CONSOLE -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RARCH_EXEC -DHAVE_RMENU -DGEKKO -DHAVE_ZLIB -DWANT_MINIZ -DHAVE_RARCH_MAIN_WRAP -DHAVE_GRIFFIN=1 -DHAVE_SCREENSHOTS -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -Dmain=rarch_main -Wno-char-subscripts
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g -DDEBUG
|
||||
|
@ -99,7 +99,7 @@ ifeq ($(HAVE_SDL), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += autosave.o thread.o
|
||||
OBJ += autosave.o thread.o gfx/thread_wrapper.o
|
||||
DEFINES += -DHAVE_THREADS
|
||||
endif
|
||||
|
||||
|
@ -16,7 +16,7 @@ INCDIRS = -I. -I$(DEVKITXENON)/usr/include
|
||||
OBJ = console/griffin/griffin.o
|
||||
|
||||
LIBS = -lretro_xenon360 -lxenon -lm -lc
|
||||
DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DRARCH_CONSOLE -DHAVE_THREAD -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main
|
||||
DEFINES = -std=gnu99 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -DRARCH_CONSOLE -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -Dmain=rarch_main
|
||||
DEFINES += -maltivec -mhard-float -m32 -mpowerpc64 -mcpu=cell -mtune=cell -fno-pic -g -Wall -DXENON $(INCDIRS) -Wno-char-subscripts
|
||||
DEFINES += -u read -u _start -u exc_base
|
||||
|
||||
|
@ -6,7 +6,6 @@ HAVE_SINC := 1
|
||||
HAVE_LOGGER := 1
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
ifeq ($(TARGET_ARCH),arm)
|
||||
LOCAL_CFLAGS += -DANDROID_ARM -marm
|
||||
LOCAL_ARM_MODE := arm
|
||||
@ -52,7 +51,7 @@ ifeq ($(PERF_TEST), 1)
|
||||
LOCAL_CFLAGS += -DPERF_TEST
|
||||
endif
|
||||
|
||||
LOCAL_CFLAGS += -Wall -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DWANT_RZLIB -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREAD -D__LIBRETRO__ -DRARCH_PERFORMANCE_MODE -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 -I../../../deps/rzlib
|
||||
LOCAL_CFLAGS += -Wall -pthread -Wno-unused-function -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_FBO -DHAVE_OVERLAY -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DWANT_MINIZ -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREADS -D__LIBRETRO__ -DRARCH_PERFORMANCE_MODE -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 -I../../../deps/miniz
|
||||
|
||||
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL -lGLESv2 $(LOGGER_LDLIBS) -ldl
|
||||
|
||||
|
@ -179,6 +179,35 @@ void input_autodetect_setup (void *data, char *msg, size_t sizeof_msg, unsigned
|
||||
keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
}
|
||||
}
|
||||
else if (strstr(name_buf, "shooter-keypad"))
|
||||
{
|
||||
/* iControlpad Bluez IME */
|
||||
g_settings.input.dpad_emulation[port] = DPAD_EMULATION_NONE;
|
||||
keycode_lut[AKEYCODE_DPAD_UP] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
|
||||
keycode_lut[AKEYCODE_DPAD_DOWN] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
|
||||
keycode_lut[AKEYCODE_DPAD_LEFT] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
|
||||
keycode_lut[AKEYCODE_DPAD_RIGHT] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_X] |= ((RETRO_DEVICE_ID_JOYPAD_B+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_B] |= ((RETRO_DEVICE_ID_JOYPAD_A+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_A] |= ((RETRO_DEVICE_ID_JOYPAD_Y+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_Y] |= ((RETRO_DEVICE_ID_JOYPAD_X+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_L1] |= ((RETRO_DEVICE_ID_JOYPAD_L+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_R1] |= ((RETRO_DEVICE_ID_JOYPAD_R+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_START] |= ((RETRO_DEVICE_ID_JOYPAD_START+1) << shift);
|
||||
keycode_lut[AKEYCODE_BUTTON_SELECT] |= ((RETRO_DEVICE_ID_JOYPAD_SELECT+1) << shift);
|
||||
|
||||
/* left analog stick */
|
||||
keycode_lut[AKEYCODE_W] |= ((RETRO_DEVICE_ID_JOYPAD_UP+1) << shift);
|
||||
keycode_lut[AKEYCODE_S] |= ((RETRO_DEVICE_ID_JOYPAD_DOWN+1) << shift);
|
||||
keycode_lut[AKEYCODE_A] |= ((RETRO_DEVICE_ID_JOYPAD_LEFT+1) << shift);
|
||||
keycode_lut[AKEYCODE_D] |= ((RETRO_DEVICE_ID_JOYPAD_RIGHT+1) << shift);
|
||||
|
||||
/* right analog stick */
|
||||
// Left - 11
|
||||
// Right - 13
|
||||
// Down - 12
|
||||
// Up - 15
|
||||
}
|
||||
else if (strstr(name_buf, "TTT THT Arcade console 2P USB Play"))
|
||||
{
|
||||
/* same as Rumblepad 2 - merge? */
|
||||
|
@ -1,7 +1,7 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.retroarch"
|
||||
android:versionCode="12"
|
||||
android:versionName="0.9.8.3" >
|
||||
android:versionName="0.9.8.4" >
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
<uses-sdk
|
||||
|
@ -9,5 +9,5 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="40px"
|
||||
android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick (TODO - TEST)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" />
|
||||
android:text="The following pads have been added to the autodetection list:\n\n* Logitech/Logicool Rumblepad 2\n* Microsoft Sidewinder USB (ISSUE - diagonals not working).\n* Microsoft Xbox 360 Wired/Wireless (ISSUE - diagonals not working).\n* PS3 Sixaxis/DualShock 3 (using either USB or Dancingpixelstudios' IME app)\n* MOGA (using either 'root' gamepad mode or official IME app)\n* JXD S5110\n* Snakebyte idroid\n* Logitech Dual Action\n* Mayflash Super Joy Box 3 Pro\n*RetroUSB SNES RetroPort\n*RetroUSB NES RetroPad\n*Buffalo SNES Pad\n* Elecom PS1/PS2 to USB\n* Archos gamepad\n* Xbox 1 (Titanium X-Joy Converter) (ISSUE - diagonals not working).\n* Red Samurai (IME app Bluetooth or gamepad mode\n* Xperia Play\n* Trust Raptor\n* Logitech F710\n* DragonRise USB\n* Madcatz PS3 fighting stick\n* iControlPad (needs to be tested)\n* iPega (iCade profile)\n* PC2JAMMA-USB (TODO - TEST)\n* Genius MaxFire G-08XU\n* Zeemote Steelseries\n* Saitek Rumblepad\n* Super Smart Joy\n* Groupwise PS2 to USB converter\n* Toodles 2008 Chimp\n* Sega Saturn USB pad\n*Mayflash Wii Classic\n* Mayflash PS2 to USB\n* Nintendo Wii (using ccpcreations.WiiUse IME app)\n* Nyko Playpad Pro" />
|
||||
</LinearLayout>
|
||||
|
@ -10,6 +10,35 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="40px"
|
||||
android:text="
|
||||
r12 (Feb 16, 2013)\n\n
|
||||
* [NEStopia] Famicom Disk System support. For Android users - put disksys.rom
|
||||
into the same folder as the FDS ROM you're trying to load. For everyone else -
|
||||
put disksys.rom into your system directory.\n
|
||||
- Y Button will switch sides of a disk.\n
|
||||
- If you get any problems of the sort DISK A / B ERR 07' - pressing Y button again or letting it run its course should do it.\n
|
||||
- NOTE - Famicom Disk System loading is slow, so you might be tempted to fast forward through most of it. However, I'd advise caution when doing so and to savestate regularly in case 'fast forwarding' can negatively affect disk loading.\n
|
||||
* [FBA core] Various changes/fixes\n
|
||||
- Hook up Eco Fighters controls (Turn 1/Turn 2 bound to L and R buttons)\n
|
||||
- Hook up Pnickie controls (Turn 1/Turn 2 bound to L and R buttons - press
|
||||
one of the buttons to progress beyond start screen)\n
|
||||
- Hook up Continental Circus controls - Brake 2/Brake 3 (L1/L2 buttons)
|
||||
and Accelerate 2/Accelerate 3 (R1/R2 buttons)\n
|
||||
- Hook up Gun Smoke controls - Start button (needed to progress beyond
|
||||
title screen)\n
|
||||
- Hook up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2)\n
|
||||
- Fixed Varia Metal palette\n
|
||||
- Fixed Fairyland Story palette\n
|
||||
- Fixed Return of the Invaders palette\n
|
||||
- Fixed Act-Fancer palette issue\n
|
||||
- Fixes pitch issue in Gals Hustle (will possibly fix more games as well)\n
|
||||
* [Android] Fixed regression where a button bound to AKEYCODE_BACK would 'exit out'
|
||||
of RetroArch.\n
|
||||
* [Android] Fixes Madcatz fighting stick being autodetected properly.\n
|
||||
* [Android] Input autodetection expanded -\n
|
||||
- iControlpad (needs to be tested)\n
|
||||
* [Unzipping [All consoles/Android]] Moved from rzlib to miniz/minizip -should increase compatibility
|
||||
with ZIP archives.\n
|
||||
\n
|
||||
r11 (Feb 11, 2013)\n\n
|
||||
* [FBA core] Various changes/fixes\n
|
||||
- Hook up Armed Police Batrider controls\n
|
||||
|
@ -72,6 +72,11 @@
|
||||
android:key="video_allow_rotate"
|
||||
android:summary="Will auto-rotate the screen for vertically oriented games."
|
||||
android:title="Auto-rotate" />
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="video_scale_integer"
|
||||
android:summary="Scales video only in whole steps of game resolution. Useful when playing without bilinear filtering."
|
||||
android:title="Scale integer" />
|
||||
|
||||
<ListPreference
|
||||
android:entries="@array/aspect_ratios"
|
||||
@ -81,12 +86,16 @@
|
||||
android:title="Aspect ratio" />
|
||||
</PreferenceCategory>
|
||||
<PreferenceCategory android:title="Synchronization" >
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="false"
|
||||
android:key="video_threaded"
|
||||
android:summary="Uses a multi-threaded video driver. Is likely to improve performance at the expense of slightly more latency and jitter. Use this if you have troubles getting good video and audio."
|
||||
android:title="Threaded video driver" />
|
||||
<EditTextPreference
|
||||
android:key="video_refresh_rate"
|
||||
android:numeric="decimal"
|
||||
android:summary="Force a specific refresh rate to be detected. Only set manually if calibration reports wrong refresh rate."
|
||||
android:title="Forced refresh rate (Hz)" />
|
||||
|
||||
<Preference
|
||||
android:summary="Attempts to find the true refresh rate of monitor. Updates value in 'Force refresh rate (Hz)' option. To help ensure accuracy, make sure no intense background services are running, and avoid triggering screensaver."
|
||||
android:title="Calibrate refresh rate" >
|
||||
|
@ -108,7 +108,6 @@ public class DisplayRefreshRateTest extends Activity {
|
||||
super.onCreate(savedInstanceState);
|
||||
Toast.makeText(this, "Touch the screen with your fingers for more accurate measurements.", Toast.LENGTH_LONG).show();
|
||||
surfaceView = new GLSurfaceView(this);
|
||||
surfaceView.setEGLConfigChooser(false);
|
||||
surfaceView.setEGLContextClientVersion(2);
|
||||
surfaceView.setRenderer(new Renderer(this));
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
|
@ -299,7 +299,7 @@ public class RetroArch extends Activity implements
|
||||
prefs.edit().putBoolean("first_time_refreshrate_calculate", true).commit();
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(this)
|
||||
.setTitle("Calculate Refresh Rate")
|
||||
.setMessage("It is highly recommended you run the refresh rate calibration test before you use RetroArch. Do you want to run it now?\n\nIf you choose No, you can run it at any time in the video preferences.")
|
||||
.setMessage("It is highly recommended you run the refresh rate calibration test before you use RetroArch. Do you want to run it now?\n\nIf you choose No, you can run it at any time in the video preferences.\n\nIf you get performance problems even after calibration, please try threaded video driver in video preferences.")
|
||||
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
@ -371,6 +371,7 @@ public class RetroArch extends Activity implements
|
||||
config.setInt("input_autodetect_icade_profile_pad4", prefs.getInt("input_autodetect_icade_profile_pad4", 0));
|
||||
|
||||
config.setDouble("video_refresh_rate", getRefreshRate());
|
||||
config.setBoolean("video_threaded", prefs.getBoolean("video_threaded", false));
|
||||
|
||||
String aspect = prefs.getString("video_aspect_ratio", "auto");
|
||||
if (aspect.equals("full")) {
|
||||
@ -389,6 +390,8 @@ public class RetroArch extends Activity implements
|
||||
config.setDouble("video_aspect_ratio", aspect_ratio);
|
||||
}
|
||||
|
||||
config.setBoolean("video_scale_integer", prefs.getBoolean("video_scale_integer", false));
|
||||
|
||||
String shaderPath = prefs.getString("video_bsnes_shader", "");
|
||||
if (prefs.getBoolean("video_shader_enable", false) && new File(shaderPath).exists()) {
|
||||
config.setString("video_shader_type", "bsnes");
|
||||
|
@ -31,12 +31,10 @@
|
||||
#define M_PI 3.14159265358979323846264338327
|
||||
#endif
|
||||
|
||||
typedef float sample_t;
|
||||
|
||||
struct resampler_data
|
||||
{
|
||||
const sample_t *data_in;
|
||||
sample_t *data_out;
|
||||
const float *data_in;
|
||||
float *data_out;
|
||||
|
||||
size_t input_frames;
|
||||
size_t output_frames;
|
||||
|
20
audio/sinc.c
20
audio/sinc.c
@ -23,6 +23,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include "../msvc/msvc_compat.h"
|
||||
|
||||
#ifndef RESAMPLER_TEST
|
||||
#include "../general.h"
|
||||
@ -104,9 +105,9 @@
|
||||
|
||||
typedef struct rarch_sinc_resampler
|
||||
{
|
||||
sample_t *phase_table;
|
||||
sample_t *buffer_l;
|
||||
sample_t *buffer_r;
|
||||
float *phase_table;
|
||||
float *buffer_l;
|
||||
float *buffer_r;
|
||||
|
||||
unsigned taps;
|
||||
|
||||
@ -115,7 +116,7 @@ typedef struct rarch_sinc_resampler
|
||||
|
||||
// A buffer for phase_table, buffer_l and buffer_r are created in a single calloc().
|
||||
// Ensure that we get as good cache locality as we can hope for.
|
||||
sample_t *main_buffer;
|
||||
float *main_buffer;
|
||||
} rarch_sinc_resampler_t;
|
||||
|
||||
static inline double sinc(double val)
|
||||
@ -389,9 +390,10 @@ static void process_sinc_neon(rarch_sinc_resampler_t *resamp, float *out_buffer)
|
||||
const float *buffer_r = resamp->buffer_r + resamp->ptr;
|
||||
|
||||
unsigned phase = resamp->time >> SUBPHASE_BITS;
|
||||
const float *phase_table = resamp->phase_table[phase];
|
||||
unsigned taps = resamp->taps;
|
||||
const float *phase_table = resamp->phase_table + phase * taps;
|
||||
|
||||
process_sinc_neon_asm(out_buffer, buffer_l, buffer_r, phase_table, resamp->taps);
|
||||
process_sinc_neon_asm(out_buffer, buffer_l, buffer_r, phase_table, taps);
|
||||
}
|
||||
#else // Plain ol' C99
|
||||
#define process_sinc_func process_sinc_C
|
||||
@ -403,8 +405,8 @@ static void resampler_sinc_process(void *re_, struct resampler_data *data)
|
||||
|
||||
uint32_t ratio = PHASES / data->ratio;
|
||||
|
||||
const sample_t *input = data->data_in;
|
||||
sample_t *output = data->data_out;
|
||||
const float *input = data->data_in;
|
||||
float *output = data->data_out;
|
||||
size_t frames = data->input_frames;
|
||||
size_t out_frames = 0;
|
||||
|
||||
@ -475,7 +477,7 @@ static void *resampler_sinc_new(double bandwidth_mod)
|
||||
#endif
|
||||
size_t elems = phase_elems + 4 * re->taps;
|
||||
|
||||
re->main_buffer = (sample_t*)aligned_alloc__(128, sizeof(sample_t) * elems);
|
||||
re->main_buffer = (float*)aligned_alloc__(128, sizeof(float) * elems);
|
||||
if (!re->main_buffer)
|
||||
goto error;
|
||||
|
||||
|
@ -221,6 +221,9 @@ static const bool disable_composition = false;
|
||||
// Video VSYNC (recommended)
|
||||
static const bool vsync = true;
|
||||
|
||||
// Threaded video. Will possibly increase performance significantly at cost of worse synchronization and latency.
|
||||
static const bool video_threaded = false;
|
||||
|
||||
// Smooths picture
|
||||
static const bool video_smooth = true;
|
||||
|
||||
|
@ -188,14 +188,20 @@ VIDEO DRIVER
|
||||
FONTS
|
||||
============================================================ */
|
||||
|
||||
#ifdef _XBOX
|
||||
#define DONT_HAVE_BITMAPFONTS
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_D3D8) || defined(HAVE_D3D9)
|
||||
|
||||
#ifdef HAVE_FREETYPE
|
||||
#include "../../gfx/fonts/freetype.c"
|
||||
#endif
|
||||
|
||||
#ifndef DONT_HAVE_BITMAPFONTS
|
||||
#include "../../gfx/fonts/fonts.c"
|
||||
#include "../../gfx/fonts/bitmapfont.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
#include "../../gfx/fonts/gl_font.c"
|
||||
@ -250,7 +256,13 @@ INPUT
|
||||
/*============================================================
|
||||
STATE TRACKER
|
||||
============================================================ */
|
||||
#ifdef _XBOX
|
||||
#define DONT_HAVE_STATE_TRACKER
|
||||
#endif
|
||||
|
||||
#ifndef DONT_HAVE_STATE_TRACKER
|
||||
#include "../../gfx/state_tracker.c"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
FIFO BUFFER
|
||||
@ -377,15 +389,17 @@ RETROARCH
|
||||
/*============================================================
|
||||
THREAD
|
||||
============================================================ */
|
||||
#if defined(HAVE_THREAD) && defined(XENON)
|
||||
#if defined(HAVE_THREADS) && defined(XENON)
|
||||
#include "../../thread/xenon_sdl_threads.c"
|
||||
#elif defined(HAVE_THREAD)
|
||||
#elif defined(HAVE_THREADS)
|
||||
#include "../../thread.c"
|
||||
#ifdef ANDROID
|
||||
#include "../../gfx/thread_wrapper.c"
|
||||
#ifndef RARCH_CONSOLE
|
||||
#include "../../autosave.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
/*============================================================
|
||||
NETPLAY
|
||||
============================================================ */
|
||||
@ -431,8 +445,10 @@ extern "C" {
|
||||
/*============================================================
|
||||
RZLIB
|
||||
============================================================ */
|
||||
#ifdef WANT_RZLIB
|
||||
#include "../../deps/rzlib/rzlib.c"
|
||||
#ifdef WANT_MINIZ
|
||||
#include "../../deps/miniz/miniz.c"
|
||||
#include "../../deps/minizip/ioapi.c"
|
||||
#include "../../deps/minizip/unzip.c"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
|
1597
deps/miniz/miniz.c
vendored
Normal file
1597
deps/miniz/miniz.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
684
deps/miniz/zlib.h
vendored
Normal file
684
deps/miniz/zlib.h
vendored
Normal file
@ -0,0 +1,684 @@
|
||||
/* miniz.c v1.14 - public domain deflate/inflate, zlib-subset, ZIP reading/writing/appending, PNG writing
|
||||
See "unlicense" statement at the end of this file.
|
||||
Rich Geldreich <richgel99@gmail.com>, last updated May 20, 2012
|
||||
Implements RFC 1950: http://www.ietf.org/rfc/rfc1950.txt and RFC 1951: http://www.ietf.org/rfc/rfc1951.txt
|
||||
|
||||
Most API's defined in miniz.c are optional. For example, to disable the archive related functions just define
|
||||
MINIZ_NO_ARCHIVE_APIS, or to get rid of all stdio usage define MINIZ_NO_STDIO (see the list below for more macros).
|
||||
|
||||
* Change History
|
||||
5/20/12 v1.14 - MinGW32/64 GCC 4.6.1 compiler fixes: added MZ_FORCEINLINE, #include <time.h> (thanks fermtect).
|
||||
5/19/12 v1.13 - From jason@cornsyrup.org and kelwert@mtu.edu - Fix mz_crc32() so it doesn't compute the wrong CRC-32's when mz_ulong is 64-bit.
|
||||
Temporarily/locally slammed in "typedef unsigned long mz_ulong" and re-ran a randomized regression test on ~500k files.
|
||||
Eliminated a bunch of warnings when compiling with GCC 32-bit/64.
|
||||
Ran all examples, miniz.c, and tinfl.c through MSVC 2008's /analyze (static analysis) option and fixed all warnings (except for the silly
|
||||
"Use of the comma-operator in a tested expression.." analysis warning, which I purposely use to work around a MSVC compiler warning).
|
||||
Created 32-bit and 64-bit Codeblocks projects/workspace. Built and tested Linux executables. The codeblocks workspace is compatible with Linux+Win32/x64.
|
||||
Added miniz_tester solution/project, which is a useful little app derived from LZHAM's tester app that I use as part of the regression test.
|
||||
Ran miniz.c and tinfl.c through another series of regression testing on ~500,000 files and archives.
|
||||
Modified example5.c so it purposely disables a bunch of high-level functionality (MINIZ_NO_STDIO, etc.). (Thanks to corysama for the MINIZ_NO_STDIO bug report.)
|
||||
Fix ftell() usage in examples so they exit with an error on files which are too large (a limitation of the examples, not miniz itself).
|
||||
4/12/12 v1.12 - More comments, added low-level example5.c, fixed a couple minor level_and_flags issues in the archive API's.
|
||||
level_and_flags can now be set to MZ_DEFAULT_COMPRESSION. Thanks to Bruce Dawson <bruced@valvesoftware.com> for the feedback/bug report.
|
||||
5/28/11 v1.11 - Added statement from unlicense.org
|
||||
5/27/11 v1.10 - Substantial compressor optimizations:
|
||||
Level 1 is now ~4x faster than before. The L1 compressor's throughput now varies between 70-110MB/sec. on a
|
||||
Core i7 (actual throughput varies depending on the type of data, and x64 vs. x86).
|
||||
Improved baseline L2-L9 compression perf. Also, greatly improved compression perf. issues on some file types.
|
||||
Refactored the compression code for better readability and maintainability.
|
||||
Added level 10 compression level (L10 has slightly better ratio than level 9, but could have a potentially large
|
||||
drop in throughput on some files).
|
||||
5/15/11 v1.09 - Initial stable release.
|
||||
|
||||
* Low-level Deflate/Inflate implementation notes:
|
||||
|
||||
Compression: Use the "tdefl" API's. The compressor supports raw, static, and dynamic blocks, lazy or
|
||||
greedy parsing, match length filtering, RLE-only, and Huffman-only streams. It performs and compresses
|
||||
approximately as well as zlib.
|
||||
|
||||
Decompression: Use the "tinfl" API's. The entire decompressor is implemented as a single function
|
||||
coroutine: see tinfl_decompress(). It supports decompression into a 32KB (or larger power of 2) wrapping buffer, or into a memory
|
||||
block large enough to hold the entire file.
|
||||
|
||||
The low-level tdefl/tinfl API's do not make any use of dynamic memory allocation.
|
||||
|
||||
* zlib-style API notes:
|
||||
|
||||
miniz.c implements a fairly large subset of zlib. There's enough functionality present for it to be a drop-in
|
||||
zlib replacement in many apps:
|
||||
The z_stream struct, optional memory allocation callbacks
|
||||
deflateInit/deflateInit2/deflate/deflateReset/deflateEnd/deflateBound
|
||||
inflateInit/inflateInit2/inflate/inflateEnd
|
||||
compress, compress2, compressBound, uncompress
|
||||
CRC-32, Adler-32 - Using modern, minimal code size, CPU cache friendly routines.
|
||||
Supports raw deflate streams or standard zlib streams with adler-32 checking.
|
||||
|
||||
Limitations:
|
||||
The callback API's are not implemented yet. No support for gzip headers or zlib static dictionaries.
|
||||
I've tried to closely emulate zlib's various flavors of stream flushing and return status codes, but
|
||||
there are no guarantees that miniz.c pulls this off perfectly.
|
||||
|
||||
* PNG writing: See the tdefl_write_image_to_png_file_in_memory() function, originally written by
|
||||
Alex Evans. Supports 1-4 bytes/pixel images.
|
||||
|
||||
* ZIP archive API notes:
|
||||
|
||||
The ZIP archive API's where designed with simplicity and efficiency in mind, with just enough abstraction to
|
||||
get the job done with minimal fuss. There are simple API's to retrieve file information, read files from
|
||||
existing archives, create new archives, append new files to existing archives, or clone archive data from
|
||||
one archive to another. It supports archives located in memory or the heap, on disk (using stdio.h),
|
||||
or you can specify custom file read/write callbacks.
|
||||
|
||||
- Archive reading: Just call this function to read a single file from a disk archive:
|
||||
|
||||
void *mz_zip_extract_archive_file_to_heap(const char *pZip_filename, const char *pArchive_name,
|
||||
size_t *pSize, mz_uint zip_flags);
|
||||
|
||||
For more complex cases, use the "mz_zip_reader" functions. Upon opening an archive, the entire central
|
||||
directory is located and read as-is into memory, and subsequent file access only occurs when reading individual files.
|
||||
|
||||
- Archives file scanning: The simple way is to use this function to scan a loaded archive for a specific file:
|
||||
|
||||
int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
|
||||
|
||||
The locate operation can optionally check file comments too, which (as one example) can be used to identify
|
||||
multiple versions of the same file in an archive. This function uses a simple linear search through the central
|
||||
directory, so it's not very fast.
|
||||
|
||||
Alternately, you can iterate through all the files in an archive (using mz_zip_reader_get_num_files()) and
|
||||
retrieve detailed info on each file by calling mz_zip_reader_file_stat().
|
||||
|
||||
- Archive creation: Use the "mz_zip_writer" functions. The ZIP writer immediately writes compressed file data
|
||||
to disk and builds an exact image of the central directory in memory. The central directory image is written
|
||||
all at once at the end of the archive file when the archive is finalized.
|
||||
|
||||
The archive writer can optionally align each file's local header and file data to any power of 2 alignment,
|
||||
which can be useful when the archive will be read from optical media. Also, the writer supports placing
|
||||
arbitrary data blobs at the very beginning of ZIP archives. Archives written using either feature are still
|
||||
readable by any ZIP tool.
|
||||
|
||||
- Archive appending: The simple way to add a single file to an archive is to call this function:
|
||||
|
||||
mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name,
|
||||
const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags);
|
||||
|
||||
The archive will be created if it doesn't already exist, otherwise it'll be appended to.
|
||||
Note the appending is done in-place and is not an atomic operation, so if something goes wrong
|
||||
during the operation it's possible the archive could be left without a central directory (although the local
|
||||
file headers and file data will be fine, so the archive will be recoverable).
|
||||
|
||||
For more complex archive modification scenarios:
|
||||
1. The safest way is to use a mz_zip_reader to read the existing archive, cloning only those bits you want to
|
||||
preserve into a new archive using using the mz_zip_writer_add_from_zip_reader() function (which compiles the
|
||||
compressed file data as-is). When you're done, delete the old archive and rename the newly written archive, and
|
||||
you're done. This is safe but requires a bunch of temporary disk space or heap memory.
|
||||
|
||||
2. Or, you can convert an mz_zip_reader in-place to an mz_zip_writer using mz_zip_writer_init_from_reader(),
|
||||
append new files as needed, then finalize the archive which will write an updated central directory to the
|
||||
original archive. (This is basically what mz_zip_add_mem_to_archive_file_in_place() does.) There's a
|
||||
possibility that the archive's central directory could be lost with this method if anything goes wrong, though.
|
||||
|
||||
- ZIP archive support limitations:
|
||||
No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
|
||||
Requires streams capable of seeking.
|
||||
|
||||
* This is a header file library, like stb_image.c. To get only a header file, either cut and paste the
|
||||
below header, or create miniz.h, #define MINIZ_HEADER_FILE_ONLY, and then include miniz.c from it.
|
||||
|
||||
* Important: For best perf. be sure to customize the below macros for your target platform:
|
||||
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
|
||||
#define MINIZ_LITTLE_ENDIAN 1
|
||||
#define MINIZ_HAS_64BIT_REGISTERS 1
|
||||
*/
|
||||
|
||||
#ifndef MINIZ_HEADER_INCLUDED
|
||||
#define MINIZ_HEADER_INCLUDED
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define MINIZ_NO_TIME
|
||||
|
||||
#if !defined(MINIZ_NO_TIME) && !defined(MINIZ_NO_ARCHIVE_APIS)
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
// Defines to completely disable specific portions of miniz.c:
|
||||
// If all macros here are defined the only functionality remaining will be CRC-32, adler-32, tinfl, and tdefl.
|
||||
|
||||
// Define MINIZ_NO_STDIO to disable all usage and any functions which rely on stdio for file I/O.
|
||||
//#define MINIZ_NO_STDIO
|
||||
|
||||
// If MINIZ_NO_TIME is specified then the ZIP archive functions will not be able to get the current time, or
|
||||
// get/set file times.
|
||||
//#define MINIZ_NO_TIME
|
||||
|
||||
// Define MINIZ_NO_ARCHIVE_APIS to disable all ZIP archive API's.
|
||||
//#define MINIZ_NO_ARCHIVE_APIS
|
||||
|
||||
// Define MINIZ_NO_ZLIB_APIS to remove all ZLIB-style compression/decompression API's.
|
||||
//#define MINIZ_NO_ZLIB_APIS
|
||||
|
||||
// Define MINIZ_NO_ZLIB_COMPATIBLE_NAME to disable zlib names, to prevent conflicts against stock zlib.
|
||||
//#define MINIZ_NO_ZLIB_COMPATIBLE_NAMES
|
||||
|
||||
#if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__i386) || defined(__i486__) || defined(__i486) || defined(i386) || defined(__ia64__) || defined(__x86_64__)
|
||||
// MINIZ_X86_OR_X64_CPU is only used to help set the below macros.
|
||||
#define MINIZ_X86_OR_X64_CPU 1
|
||||
#endif
|
||||
|
||||
#if (__BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || MINIZ_X86_OR_X64_CPU
|
||||
// Set MINIZ_LITTLE_ENDIAN to 1 if the processor is little endian.
|
||||
#define MINIZ_LITTLE_ENDIAN 1
|
||||
#endif
|
||||
|
||||
#if MINIZ_X86_OR_X64_CPU
|
||||
// Set MINIZ_USE_UNALIGNED_LOADS_AND_STORES to 1 on CPU's that permit efficient integer loads and stores from unaligned addresses.
|
||||
#define MINIZ_USE_UNALIGNED_LOADS_AND_STORES 1
|
||||
#endif
|
||||
|
||||
#if defined(_M_X64) || defined(_WIN64) || defined(__MINGW64__) || defined(_LP64) || defined(__LP64__) || defined(__ia64__) || defined(__x86_64__)
|
||||
// Set MINIZ_HAS_64BIT_REGISTERS to 1 if operations on 64-bit integers are reasonably fast (and don't involve compiler generated calls to helper functions).
|
||||
#define MINIZ_HAS_64BIT_REGISTERS 1
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// ------------------- zlib-style API Definitions.
|
||||
|
||||
// For more compatibility with zlib, miniz.c uses unsigned long for some parameters/struct members. Beware: mz_ulong can be either 32 or 64-bits!
|
||||
typedef unsigned long mz_ulong;
|
||||
|
||||
// mz_free() internally uses the MZ_FREE() macro (which by default calls free() unless you've modified the MZ_MALLOC macro) to release a block allocated from the heap.
|
||||
void mz_free(void *p);
|
||||
|
||||
#define MZ_ADLER32_INIT (1)
|
||||
// mz_adler32() returns the initial adler-32 value to use when called with ptr==NULL.
|
||||
mz_ulong mz_adler32(mz_ulong adler, const unsigned char *ptr, size_t buf_len);
|
||||
|
||||
#define MZ_CRC32_INIT (0)
|
||||
// minizip_crc32() returns the initial CRC-32 value to use when called with ptr==NULL.
|
||||
mz_ulong minizip_crc32(mz_ulong crc, const unsigned char *ptr, size_t buf_len);
|
||||
|
||||
unsigned crc32(unsigned crc, const void *ptr, size_t buf_len);
|
||||
|
||||
// Compression strategies.
|
||||
enum { MZ_DEFAULT_STRATEGY = 0, MZ_FILTERED = 1, MZ_HUFFMAN_ONLY = 2, MZ_RLE = 3, MZ_FIXED = 4 };
|
||||
|
||||
// Method
|
||||
#define MZ_DEFLATED 8
|
||||
|
||||
#ifndef MINIZ_NO_ZLIB_APIS
|
||||
|
||||
// Heap allocation callbacks.
|
||||
// Note that mz_alloc_func parameter types purpsosely differ from zlib's: items/size is size_t, not unsigned long.
|
||||
typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
|
||||
typedef void (*mz_free_func)(void *opaque, void *address);
|
||||
typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size);
|
||||
|
||||
#define MZ_VERSION "9.1.14"
|
||||
#define MZ_VERNUM 0x91E0
|
||||
#define MZ_VER_MAJOR 9
|
||||
#define MZ_VER_MINOR 1
|
||||
#define MZ_VER_REVISION 14
|
||||
#define MZ_VER_SUBREVISION 0
|
||||
|
||||
// Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other values are for advanced use (refer to the zlib docs).
|
||||
enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 };
|
||||
|
||||
// Return status codes. MZ_PARAM_ERROR is non-standard.
|
||||
enum { MZ_OK = 0, MZ_STREAM_END = 1, MZ_NEED_DICT = 2, MZ_ERRNO = -1, MZ_STREAM_ERROR = -2, MZ_DATA_ERROR = -3, MZ_MEM_ERROR = -4, MZ_BUF_ERROR = -5, MZ_VERSION_ERROR = -6, MZ_PARAM_ERROR = -10000 };
|
||||
|
||||
// Compression levels: 0-9 are the standard zlib-style levels, 10 is best possible compression (not zlib compatible, and may be very slow), MZ_DEFAULT_COMPRESSION=MZ_DEFAULT_LEVEL.
|
||||
enum { MZ_NO_COMPRESSION = 0, MZ_BEST_SPEED = 1, MZ_BEST_COMPRESSION = 9, MZ_UBER_COMPRESSION = 10, MZ_DEFAULT_LEVEL = 6, MZ_DEFAULT_COMPRESSION = -1 };
|
||||
|
||||
// Window bits
|
||||
#define MZ_DEFAULT_WINDOW_BITS 15
|
||||
|
||||
struct mz_internal_state;
|
||||
|
||||
// Compression/decompression stream struct.
|
||||
typedef struct mz_stream_s
|
||||
{
|
||||
const unsigned char *next_in; // pointer to next byte to read
|
||||
unsigned int avail_in; // number of bytes available at next_in
|
||||
mz_ulong total_in; // total number of bytes consumed so far
|
||||
|
||||
unsigned char *next_out; // pointer to next byte to write
|
||||
unsigned int avail_out; // number of bytes that can be written to next_out
|
||||
mz_ulong total_out; // total number of bytes produced so far
|
||||
|
||||
char *msg; // error msg (unused)
|
||||
struct mz_internal_state *state; // internal state, allocated by zalloc/zfree
|
||||
|
||||
mz_alloc_func zalloc; // optional heap allocation function (defaults to malloc)
|
||||
mz_free_func zfree; // optional heap free function (defaults to free)
|
||||
void *opaque; // heap alloc function user pointer
|
||||
|
||||
int data_type; // data_type (unused)
|
||||
mz_ulong adler; // adler32 of the source or uncompressed data
|
||||
mz_ulong reserved; // not used
|
||||
} mz_stream;
|
||||
|
||||
typedef mz_stream *mz_streamp;
|
||||
|
||||
// Returns the version string of miniz.c.
|
||||
const char *mz_version(void);
|
||||
|
||||
// mz_deflateInit() initializes a compressor with default options:
|
||||
// Parameters:
|
||||
// pStream must point to an initialized mz_stream struct.
|
||||
// level must be between [MZ_NO_COMPRESSION, MZ_BEST_COMPRESSION].
|
||||
// level 1 enables a specially optimized compression function that's been optimized purely for performance, not ratio.
|
||||
// (This special func. is currently only enabled when MINIZ_USE_UNALIGNED_LOADS_AND_STORES and MINIZ_LITTLE_ENDIAN are defined.)
|
||||
// Return values:
|
||||
// MZ_OK on success.
|
||||
// MZ_STREAM_ERROR if the stream is bogus.
|
||||
// MZ_PARAM_ERROR if the input parameters are bogus.
|
||||
// MZ_MEM_ERROR on out of memory.
|
||||
int mz_deflateInit(mz_streamp pStream, int level);
|
||||
|
||||
// mz_deflateInit2() is like mz_deflate(), except with more control:
|
||||
// Additional parameters:
|
||||
// method must be MZ_DEFLATED
|
||||
// window_bits must be MZ_DEFAULT_WINDOW_BITS (to wrap the deflate stream with zlib header/adler-32 footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate/no header or footer)
|
||||
// mem_level must be between [1, 9] (it's checked but ignored by miniz.c)
|
||||
int mz_deflateInit2(mz_streamp pStream, int level, int method, int window_bits, int mem_level, int strategy);
|
||||
|
||||
// Quickly resets a compressor without having to reallocate anything. Same as calling mz_deflateEnd() followed by mz_deflateInit()/mz_deflateInit2().
|
||||
int mz_deflateReset(mz_streamp pStream);
|
||||
|
||||
// mz_deflate() compresses the input to output, consuming as much of the input and producing as much output as possible.
|
||||
// Parameters:
|
||||
// pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
|
||||
// flush may be MZ_NO_FLUSH, MZ_PARTIAL_FLUSH/MZ_SYNC_FLUSH, MZ_FULL_FLUSH, or MZ_FINISH.
|
||||
// Return values:
|
||||
// MZ_OK on success (when flushing, or if more input is needed but not available, and/or there's more output to be written but the output buffer is full).
|
||||
// MZ_STREAM_END if all input has been consumed and all output bytes have been written. Don't call mz_deflate() on the stream anymore.
|
||||
// MZ_STREAM_ERROR if the stream is bogus.
|
||||
// MZ_PARAM_ERROR if one of the parameters is invalid.
|
||||
// MZ_BUF_ERROR if no forward progress is possible because the input and/or output buffers are empty. (Fill up the input buffer or free up some output space and try again.)
|
||||
int mz_deflate(mz_streamp pStream, int flush);
|
||||
|
||||
// mz_deflateEnd() deinitializes a compressor:
|
||||
// Return values:
|
||||
// MZ_OK on success.
|
||||
// MZ_STREAM_ERROR if the stream is bogus.
|
||||
int mz_deflateEnd(mz_streamp pStream);
|
||||
|
||||
// mz_deflateBound() returns a (very) conservative upper bound on the amount of data that could be generated by deflate(), assuming flush is set to only MZ_NO_FLUSH or MZ_FINISH.
|
||||
mz_ulong mz_deflateBound(mz_streamp pStream, mz_ulong source_len);
|
||||
|
||||
// Single-call compression functions mz_compress() and mz_compress2():
|
||||
// Returns MZ_OK on success, or one of the error codes from mz_deflate() on failure.
|
||||
int mz_compress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
|
||||
int mz_compress2(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len, int level);
|
||||
|
||||
// mz_compressBound() returns a (very) conservative upper bound on the amount of data that could be generated by calling mz_compress().
|
||||
mz_ulong mz_compressBound(mz_ulong source_len);
|
||||
|
||||
// Initializes a decompressor.
|
||||
int mz_inflateInit(mz_streamp pStream);
|
||||
|
||||
// mz_inflateInit2() is like mz_inflateInit() with an additional option that controls the window size and whether or not the stream has been wrapped with a zlib header/footer:
|
||||
// window_bits must be MZ_DEFAULT_WINDOW_BITS (to parse zlib header/footer) or -MZ_DEFAULT_WINDOW_BITS (raw deflate).
|
||||
int mz_inflateInit2(mz_streamp pStream, int window_bits);
|
||||
|
||||
// Decompresses the input stream to the output, consuming only as much of the input as needed, and writing as much to the output as possible.
|
||||
// Parameters:
|
||||
// pStream is the stream to read from and write to. You must initialize/update the next_in, avail_in, next_out, and avail_out members.
|
||||
// flush may be MZ_NO_FLUSH, MZ_SYNC_FLUSH, or MZ_FINISH.
|
||||
// On the first call, if flush is MZ_FINISH it's assumed the input and output buffers are both sized large enough to decompress the entire stream in a single call (this is slightly faster).
|
||||
// MZ_FINISH implies that there are no more source bytes available beside what's already in the input buffer, and that the output buffer is large enough to hold the rest of the decompressed data.
|
||||
// Return values:
|
||||
// MZ_OK on success. Either more input is needed but not available, and/or there's more output to be written but the output buffer is full.
|
||||
// MZ_STREAM_END if all needed input has been consumed and all output bytes have been written. For zlib streams, the adler-32 of the decompressed data has also been verified.
|
||||
// MZ_STREAM_ERROR if the stream is bogus.
|
||||
// MZ_DATA_ERROR if the deflate stream is invalid.
|
||||
// MZ_PARAM_ERROR if one of the parameters is invalid.
|
||||
// MZ_BUF_ERROR if no forward progress is possible because the input buffer is empty but the inflater needs more input to continue, or if the output buffer is not large enough. Call mz_inflate() again
|
||||
// with more input data, or with more room in the output buffer (except when using single call decompression, described above).
|
||||
int mz_inflate(mz_streamp pStream, int flush);
|
||||
|
||||
// Deinitializes a decompressor.
|
||||
int mz_inflateEnd(mz_streamp pStream);
|
||||
|
||||
// Single-call decompression.
|
||||
// Returns MZ_OK on success, or one of the error codes from mz_inflate() on failure.
|
||||
int mz_uncompress(unsigned char *pDest, mz_ulong *pDest_len, const unsigned char *pSource, mz_ulong source_len);
|
||||
|
||||
// Returns a string description of the specified error code, or NULL if the error code is invalid.
|
||||
const char *mz_error(int err);
|
||||
|
||||
// Redefine zlib-compatible names to miniz equivalents, so miniz.c can be used as a drop-in replacement for the subset of zlib that miniz.c supports.
|
||||
// Define MINIZ_NO_ZLIB_COMPATIBLE_NAMES to disable zlib-compatibility if you use zlib in the same project.
|
||||
#ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
|
||||
typedef unsigned char Byte;
|
||||
typedef unsigned int uInt;
|
||||
typedef mz_ulong uLong;
|
||||
typedef Byte Bytef;
|
||||
typedef uInt uIntf;
|
||||
typedef char charf;
|
||||
typedef int intf;
|
||||
typedef void *voidpf;
|
||||
typedef uLong uLongf;
|
||||
typedef void *voidp;
|
||||
typedef void *const voidpc;
|
||||
#define Z_NULL 0
|
||||
#define Z_NO_FLUSH MZ_NO_FLUSH
|
||||
#define Z_PARTIAL_FLUSH MZ_PARTIAL_FLUSH
|
||||
#define Z_SYNC_FLUSH MZ_SYNC_FLUSH
|
||||
#define Z_FULL_FLUSH MZ_FULL_FLUSH
|
||||
#define Z_FINISH MZ_FINISH
|
||||
#define Z_BLOCK MZ_BLOCK
|
||||
#define Z_OK MZ_OK
|
||||
#define Z_STREAM_END MZ_STREAM_END
|
||||
#define Z_NEED_DICT MZ_NEED_DICT
|
||||
#define Z_ERRNO MZ_ERRNO
|
||||
#define Z_STREAM_ERROR MZ_STREAM_ERROR
|
||||
#define Z_DATA_ERROR MZ_DATA_ERROR
|
||||
#define Z_MEM_ERROR MZ_MEM_ERROR
|
||||
#define Z_BUF_ERROR MZ_BUF_ERROR
|
||||
#define Z_VERSION_ERROR MZ_VERSION_ERROR
|
||||
#define Z_PARAM_ERROR MZ_PARAM_ERROR
|
||||
#define Z_NO_COMPRESSION MZ_NO_COMPRESSION
|
||||
#define Z_BEST_SPEED MZ_BEST_SPEED
|
||||
#define Z_BEST_COMPRESSION MZ_BEST_COMPRESSION
|
||||
#define Z_DEFAULT_COMPRESSION MZ_DEFAULT_COMPRESSION
|
||||
#define Z_DEFAULT_STRATEGY MZ_DEFAULT_STRATEGY
|
||||
#define Z_FILTERED MZ_FILTERED
|
||||
#define Z_HUFFMAN_ONLY MZ_HUFFMAN_ONLY
|
||||
#define Z_RLE MZ_RLE
|
||||
#define Z_FIXED MZ_FIXED
|
||||
#define Z_DEFLATED MZ_DEFLATED
|
||||
#define Z_DEFAULT_WINDOW_BITS MZ_DEFAULT_WINDOW_BITS
|
||||
#define alloc_func mz_alloc_func
|
||||
//#define free_func mz_free_func
|
||||
#define internal_state mz_internal_state
|
||||
#define z_stream mz_stream
|
||||
#define deflateInit mz_deflateInit
|
||||
#define deflateInit2 mz_deflateInit2
|
||||
#define deflateReset mz_deflateReset
|
||||
#define deflate mz_deflate
|
||||
#define deflateEnd mz_deflateEnd
|
||||
#define deflateBound mz_deflateBound
|
||||
#define compress mz_compress
|
||||
#define compress2 mz_compress2
|
||||
#define compressBound mz_compressBound
|
||||
#define inflateInit mz_inflateInit
|
||||
#define inflateInit2 mz_inflateInit2
|
||||
#define inflate mz_inflate
|
||||
#define inflateEnd mz_inflateEnd
|
||||
#define uncompress mz_uncompress
|
||||
#define crc32 crc32
|
||||
#define adler32 mz_adler32
|
||||
#define MAX_WBITS 15
|
||||
#define MAX_MEM_LEVEL 9
|
||||
#define zError mz_error
|
||||
#define ZLIB_VERSION MZ_VERSION
|
||||
#define ZLIB_VERNUM MZ_VERNUM
|
||||
#define ZLIB_VER_MAJOR MZ_VER_MAJOR
|
||||
#define ZLIB_VER_MINOR MZ_VER_MINOR
|
||||
#define ZLIB_VER_REVISION MZ_VER_REVISION
|
||||
#define ZLIB_VER_SUBREVISION MZ_VER_SUBREVISION
|
||||
#define zlibVersion mz_version
|
||||
#define zlib_version mz_version()
|
||||
#endif // #ifndef MINIZ_NO_ZLIB_COMPATIBLE_NAMES
|
||||
|
||||
#endif // MINIZ_NO_ZLIB_APIS
|
||||
|
||||
// ------------------- Types and macros
|
||||
|
||||
typedef unsigned char mz_uint8;
|
||||
typedef signed short mz_int16;
|
||||
typedef unsigned short mz_uint16;
|
||||
typedef unsigned int mz_uint32;
|
||||
typedef unsigned int mz_uint;
|
||||
typedef long long mz_int64;
|
||||
typedef unsigned long long mz_uint64;
|
||||
typedef int mz_bool;
|
||||
|
||||
#define MZ_FALSE (0)
|
||||
#define MZ_TRUE (1)
|
||||
|
||||
// Works around MSVC's spammy "warning C4127: conditional expression is constant" message.
|
||||
#ifdef _MSC_VER
|
||||
#define MZ_MACRO_END while (0, 0)
|
||||
#else
|
||||
#define MZ_MACRO_END while (0)
|
||||
#endif
|
||||
|
||||
// ------------------- ZIP archive reading/writing
|
||||
|
||||
#ifndef MINIZ_NO_ARCHIVE_APIS
|
||||
|
||||
enum
|
||||
{
|
||||
MZ_ZIP_MAX_IO_BUF_SIZE = 64*1024,
|
||||
MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 260,
|
||||
MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 256
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
mz_uint32 m_file_index;
|
||||
mz_uint32 m_central_dir_ofs;
|
||||
mz_uint16 m_version_made_by;
|
||||
mz_uint16 m_version_needed;
|
||||
mz_uint16 m_bit_flag;
|
||||
mz_uint16 m_method;
|
||||
#ifndef MINIZ_NO_TIME
|
||||
time_t m_time;
|
||||
#endif
|
||||
mz_uint32 m_crc32;
|
||||
mz_uint64 m_comp_size;
|
||||
mz_uint64 m_uncomp_size;
|
||||
mz_uint16 m_internal_attr;
|
||||
mz_uint32 m_external_attr;
|
||||
mz_uint64 m_local_header_ofs;
|
||||
mz_uint32 m_comment_size;
|
||||
char m_filename[MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE];
|
||||
char m_comment[MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE];
|
||||
} mz_zip_archive_file_stat;
|
||||
|
||||
typedef size_t (*mz_file_read_func)(void *pOpaque, mz_uint64 file_ofs, void *pBuf, size_t n);
|
||||
typedef size_t (*mz_file_write_func)(void *pOpaque, mz_uint64 file_ofs, const void *pBuf, size_t n);
|
||||
|
||||
struct mz_zip_internal_state_tag;
|
||||
typedef struct mz_zip_internal_state_tag mz_zip_internal_state;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MZ_ZIP_MODE_INVALID = 0,
|
||||
MZ_ZIP_MODE_READING = 1,
|
||||
MZ_ZIP_MODE_WRITING = 2,
|
||||
MZ_ZIP_MODE_WRITING_HAS_BEEN_FINALIZED = 3
|
||||
} mz_zip_mode;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
mz_uint64 m_archive_size;
|
||||
mz_uint64 m_central_directory_file_ofs;
|
||||
mz_uint m_total_files;
|
||||
mz_zip_mode m_zip_mode;
|
||||
|
||||
mz_uint m_file_offset_alignment;
|
||||
|
||||
mz_alloc_func m_pAlloc;
|
||||
mz_free_func m_pFree;
|
||||
mz_realloc_func m_pRealloc;
|
||||
void *m_pAlloc_opaque;
|
||||
|
||||
mz_file_read_func m_pRead;
|
||||
mz_file_write_func m_pWrite;
|
||||
void *m_pIO_opaque;
|
||||
|
||||
mz_zip_internal_state *m_pState;
|
||||
|
||||
} mz_zip_archive;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MZ_ZIP_FLAG_CASE_SENSITIVE = 0x0100,
|
||||
MZ_ZIP_FLAG_IGNORE_PATH = 0x0200,
|
||||
MZ_ZIP_FLAG_COMPRESSED_DATA = 0x0400,
|
||||
MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY = 0x0800
|
||||
} mz_zip_flags;
|
||||
|
||||
// ZIP archive reading
|
||||
|
||||
// Inits a ZIP archive reader.
|
||||
// These functions read and validate the archive's central directory.
|
||||
mz_bool mz_zip_reader_init(mz_zip_archive *pZip, mz_uint64 size, mz_uint32 flags);
|
||||
mz_bool mz_zip_reader_init_mem(mz_zip_archive *pZip, const void *pMem, size_t size, mz_uint32 flags);
|
||||
|
||||
#ifndef MINIZ_NO_STDIO
|
||||
mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags);
|
||||
#endif
|
||||
|
||||
// Returns the total number of files in the archive.
|
||||
mz_uint mz_zip_reader_get_num_files(mz_zip_archive *pZip);
|
||||
|
||||
// Returns detailed information about an archive file entry.
|
||||
mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index, mz_zip_archive_file_stat *pStat);
|
||||
|
||||
// Determines if an archive file entry is a directory entry.
|
||||
mz_bool mz_zip_reader_is_file_a_directory(mz_zip_archive *pZip, mz_uint file_index);
|
||||
mz_bool mz_zip_reader_is_file_encrypted(mz_zip_archive *pZip, mz_uint file_index);
|
||||
|
||||
// Retrieves the filename of an archive file entry.
|
||||
// Returns the number of bytes written to pFilename, or if filename_buf_size is 0 this function returns the number of bytes needed to fully store the filename.
|
||||
mz_uint mz_zip_reader_get_filename(mz_zip_archive *pZip, mz_uint file_index, char *pFilename, mz_uint filename_buf_size);
|
||||
|
||||
// Attempts to locates a file in the archive's central directory.
|
||||
// Valid flags: MZ_ZIP_FLAG_CASE_SENSITIVE, MZ_ZIP_FLAG_IGNORE_PATH
|
||||
// Returns -1 if the file cannot be found.
|
||||
int mz_zip_reader_locate_file(mz_zip_archive *pZip, const char *pName, const char *pComment, mz_uint flags);
|
||||
|
||||
// Extracts a archive file to a memory buffer using no memory allocation.
|
||||
mz_bool mz_zip_reader_extract_to_mem_no_alloc(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
|
||||
mz_bool mz_zip_reader_extract_file_to_mem_no_alloc(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags, void *pUser_read_buf, size_t user_read_buf_size);
|
||||
|
||||
// Extracts a archive file to a memory buffer.
|
||||
mz_bool mz_zip_reader_extract_to_mem(mz_zip_archive *pZip, mz_uint file_index, void *pBuf, size_t buf_size, mz_uint flags);
|
||||
mz_bool mz_zip_reader_extract_file_to_mem(mz_zip_archive *pZip, const char *pFilename, void *pBuf, size_t buf_size, mz_uint flags);
|
||||
|
||||
// Extracts a archive file to a dynamically allocated heap buffer.
|
||||
void *mz_zip_reader_extract_to_heap(mz_zip_archive *pZip, mz_uint file_index, size_t *pSize, mz_uint flags);
|
||||
void *mz_zip_reader_extract_file_to_heap(mz_zip_archive *pZip, const char *pFilename, size_t *pSize, mz_uint flags);
|
||||
|
||||
// Extracts a archive file using a callback function to output the file's data.
|
||||
mz_bool mz_zip_reader_extract_to_callback(mz_zip_archive *pZip, mz_uint file_index, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
|
||||
mz_bool mz_zip_reader_extract_file_to_callback(mz_zip_archive *pZip, const char *pFilename, mz_file_write_func pCallback, void *pOpaque, mz_uint flags);
|
||||
|
||||
#ifndef MINIZ_NO_STDIO
|
||||
// Extracts a archive file to a disk file and sets its last accessed and modified times.
|
||||
// This function only extracts files, not archive directory records.
|
||||
mz_bool mz_zip_reader_extract_to_file(mz_zip_archive *pZip, mz_uint file_index, const char *pDst_filename, mz_uint flags);
|
||||
mz_bool mz_zip_reader_extract_file_to_file(mz_zip_archive *pZip, const char *pArchive_filename, const char *pDst_filename, mz_uint flags);
|
||||
#endif
|
||||
|
||||
// Ends archive reading, freeing all allocations, and closing the input archive file if mz_zip_reader_init_file() was used.
|
||||
mz_bool mz_zip_reader_end(mz_zip_archive *pZip);
|
||||
|
||||
#endif // #ifndef MINIZ_NO_ARCHIVE_APIS
|
||||
|
||||
// ------------------- Low-level Decompression API Definitions
|
||||
|
||||
// Decompression flags used by tinfl_decompress().
|
||||
// TINFL_FLAG_PARSE_ZLIB_HEADER: If set, the input has a valid zlib header and ends with an adler32 checksum (it's a valid zlib stream). Otherwise, the input is a raw deflate stream.
|
||||
// TINFL_FLAG_HAS_MORE_INPUT: If set, there are more input bytes available beyond the end of the supplied input buffer. If clear, the input buffer contains all remaining input.
|
||||
// TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF: If set, the output buffer is large enough to hold the entire decompressed stream. If clear, the output buffer is at least the size of the dictionary (typically 32KB).
|
||||
// TINFL_FLAG_COMPUTE_ADLER32: Force adler-32 checksum computation of the decompressed bytes.
|
||||
enum
|
||||
{
|
||||
TINFL_FLAG_PARSE_ZLIB_HEADER = 1,
|
||||
TINFL_FLAG_HAS_MORE_INPUT = 2,
|
||||
TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF = 4,
|
||||
TINFL_FLAG_COMPUTE_ADLER32 = 8
|
||||
};
|
||||
|
||||
// High level decompression functions:
|
||||
// tinfl_decompress_mem_to_heap() decompresses a block in memory to a heap block allocated via malloc().
|
||||
// On entry:
|
||||
// pSrc_buf, src_buf_len: Pointer and size of the Deflate or zlib source data to decompress.
|
||||
// On return:
|
||||
// Function returns a pointer to the decompressed data, or NULL on failure.
|
||||
// *pOut_len will be set to the decompressed data's size, which could be larger than src_buf_len on uncompressible data.
|
||||
// The caller must call mz_free() on the returned block when it's no longer needed.
|
||||
void *tinfl_decompress_mem_to_heap(const void *pSrc_buf, size_t src_buf_len, size_t *pOut_len, int flags);
|
||||
|
||||
// tinfl_decompress_mem_to_mem() decompresses a block in memory to another block in memory.
|
||||
// Returns TINFL_DECOMPRESS_MEM_TO_MEM_FAILED on failure, or the number of bytes written on success.
|
||||
#define TINFL_DECOMPRESS_MEM_TO_MEM_FAILED ((size_t)(-1))
|
||||
size_t tinfl_decompress_mem_to_mem(void *pOut_buf, size_t out_buf_len, const void *pSrc_buf, size_t src_buf_len, int flags);
|
||||
|
||||
// tinfl_decompress_mem_to_callback() decompresses a block in memory to an internal 32KB buffer, and a user provided callback function will be called to flush the buffer.
|
||||
// Returns 1 on success or 0 on failure.
|
||||
typedef int (*tinfl_put_buf_func_ptr)(const void* pBuf, int len, void *pUser);
|
||||
int tinfl_decompress_mem_to_callback(const void *pIn_buf, size_t *pIn_buf_size, tinfl_put_buf_func_ptr pPut_buf_func, void *pPut_buf_user, int flags);
|
||||
|
||||
struct tinfl_decompressor_tag; typedef struct tinfl_decompressor_tag tinfl_decompressor;
|
||||
|
||||
// Max size of LZ dictionary.
|
||||
#define TINFL_LZ_DICT_SIZE 32768
|
||||
|
||||
// Return status.
|
||||
typedef enum
|
||||
{
|
||||
TINFL_STATUS_BAD_PARAM = -3,
|
||||
TINFL_STATUS_ADLER32_MISMATCH = -2,
|
||||
TINFL_STATUS_FAILED = -1,
|
||||
TINFL_STATUS_DONE = 0,
|
||||
TINFL_STATUS_NEEDS_MORE_INPUT = 1,
|
||||
TINFL_STATUS_HAS_MORE_OUTPUT = 2
|
||||
} tinfl_status;
|
||||
|
||||
// Initializes the decompressor to its initial state.
|
||||
#define tinfl_init(r) do { (r)->m_state = 0; } MZ_MACRO_END
|
||||
#define tinfl_get_adler32(r) (r)->m_check_adler32
|
||||
|
||||
// Main low-level decompressor coroutine function. This is the only function actually needed for decompression. All the other functions are just high-level helpers for improved usability.
|
||||
// This is a universal API, i.e. it can be used as a building block to build any desired higher level decompression API. In the limit case, it can be called once per every byte input or output.
|
||||
tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags);
|
||||
|
||||
// Internal/private bits follow.
|
||||
enum
|
||||
{
|
||||
TINFL_MAX_HUFF_TABLES = 3, TINFL_MAX_HUFF_SYMBOLS_0 = 288, TINFL_MAX_HUFF_SYMBOLS_1 = 32, TINFL_MAX_HUFF_SYMBOLS_2 = 19,
|
||||
TINFL_FAST_LOOKUP_BITS = 10, TINFL_FAST_LOOKUP_SIZE = 1 << TINFL_FAST_LOOKUP_BITS
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
mz_uint8 m_code_size[TINFL_MAX_HUFF_SYMBOLS_0];
|
||||
mz_int16 m_look_up[TINFL_FAST_LOOKUP_SIZE], m_tree[TINFL_MAX_HUFF_SYMBOLS_0 * 2];
|
||||
} tinfl_huff_table;
|
||||
|
||||
#if MINIZ_HAS_64BIT_REGISTERS
|
||||
#define TINFL_USE_64BIT_BITBUF 1
|
||||
#endif
|
||||
|
||||
#if TINFL_USE_64BIT_BITBUF
|
||||
typedef mz_uint64 tinfl_bit_buf_t;
|
||||
#define TINFL_BITBUF_SIZE (64)
|
||||
#else
|
||||
typedef mz_uint32 tinfl_bit_buf_t;
|
||||
#define TINFL_BITBUF_SIZE (32)
|
||||
#endif
|
||||
|
||||
struct tinfl_decompressor_tag
|
||||
{
|
||||
mz_uint32 m_state, m_num_bits, m_zhdr0, m_zhdr1, m_z_adler32, m_final, m_type, m_check_adler32, m_dist, m_counter, m_num_extra, m_table_sizes[TINFL_MAX_HUFF_TABLES];
|
||||
tinfl_bit_buf_t m_bit_buf;
|
||||
size_t m_dist_from_out_buf_start;
|
||||
tinfl_huff_table m_tables[TINFL_MAX_HUFF_TABLES];
|
||||
mz_uint8 m_raw_header[4], m_len_codes[TINFL_MAX_HUFF_SYMBOLS_0 + TINFL_MAX_HUFF_SYMBOLS_1 + 137];
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MINIZ_HEADER_INCLUDED
|
131
deps/minizip/ioapi.c
vendored
Normal file
131
deps/minizip/ioapi.c
vendored
Normal file
@ -0,0 +1,131 @@
|
||||
/* ioapi.c -- IO base function header for compress/uncompress .zip
|
||||
files using zlib + zip or unzip API
|
||||
|
||||
Version 1.01e, February 12th, 2005
|
||||
|
||||
Copyright (C) 1998-2005 Gilles Vollant
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../miniz/zlib.h"
|
||||
#include "ioapi.h"
|
||||
|
||||
|
||||
|
||||
/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */
|
||||
|
||||
#ifndef SEEK_CUR
|
||||
#define SEEK_CUR 1
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_END
|
||||
#define SEEK_END 2
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_SET
|
||||
#define SEEK_SET 0
|
||||
#endif
|
||||
|
||||
voidpf fopen_file_func (
|
||||
voidpf opaque,
|
||||
const char* filename,
|
||||
int mode);
|
||||
|
||||
uLong fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size);
|
||||
uLong fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size);
|
||||
long ftell_file_func (voidpf opaque, voidpf stream);
|
||||
long fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin);
|
||||
int fclose_file_func (voidpf opaque, voidpf stream);
|
||||
int ferror_file_func (voidpf opaque, voidpf stream);
|
||||
|
||||
voidpf fopen_file_func (voidpf opaque, const char *filename, int mode)
|
||||
{
|
||||
FILE* file = NULL;
|
||||
const char* mode_fopen = NULL;
|
||||
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
|
||||
mode_fopen = "rb";
|
||||
else
|
||||
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
|
||||
mode_fopen = "r+b";
|
||||
else
|
||||
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
|
||||
mode_fopen = "wb";
|
||||
|
||||
if ((filename!=NULL) && (mode_fopen != NULL))
|
||||
file = fopen(filename, mode_fopen);
|
||||
return file;
|
||||
}
|
||||
|
||||
|
||||
uLong fread_file_func (voidpf opaque, voidpf stream, void *buf, uLong size)
|
||||
{
|
||||
uLong ret;
|
||||
ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
uLong fwrite_file_func (voidpf opaque, voidpf stream, const void *buf, uLong size)
|
||||
{
|
||||
uLong ret;
|
||||
ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ftell_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
long ret;
|
||||
ret = ftell((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
long fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin)
|
||||
{
|
||||
int fseek_origin=0;
|
||||
long ret;
|
||||
switch (origin)
|
||||
{
|
||||
case ZLIB_FILEFUNC_SEEK_CUR :
|
||||
fseek_origin = SEEK_CUR;
|
||||
break;
|
||||
case ZLIB_FILEFUNC_SEEK_END :
|
||||
fseek_origin = SEEK_END;
|
||||
break;
|
||||
case ZLIB_FILEFUNC_SEEK_SET :
|
||||
fseek_origin = SEEK_SET;
|
||||
break;
|
||||
default: return -1;
|
||||
}
|
||||
ret = 0;
|
||||
fseek((FILE *)stream, offset, fseek_origin);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fclose_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ret;
|
||||
ret = fclose((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int ferror_file_func (voidpf opaque, voidpf stream)
|
||||
{
|
||||
int ret;
|
||||
ret = ferror((FILE *)stream);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void fill_fopen_filefunc (zlib_filefunc_def*pzlib_filefunc_def)
|
||||
{
|
||||
pzlib_filefunc_def->zopen_file = fopen_file_func;
|
||||
pzlib_filefunc_def->zread_file = fread_file_func;
|
||||
pzlib_filefunc_def->zwrite_file = fwrite_file_func;
|
||||
pzlib_filefunc_def->ztell_file = ftell_file_func;
|
||||
pzlib_filefunc_def->zseek_file = fseek_file_func;
|
||||
pzlib_filefunc_def->zclose_file = fclose_file_func;
|
||||
pzlib_filefunc_def->zerror_file = ferror_file_func;
|
||||
pzlib_filefunc_def->opaque = NULL;
|
||||
}
|
64
deps/minizip/ioapi.h
vendored
Normal file
64
deps/minizip/ioapi.h
vendored
Normal file
@ -0,0 +1,64 @@
|
||||
/* ioapi.h -- IO base function header for compress/uncompress .zip
|
||||
files using zlib + zip or unzip API
|
||||
|
||||
Version 1.01e, February 12th, 2005
|
||||
|
||||
Copyright (C) 1998-2005 Gilles Vollant
|
||||
*/
|
||||
|
||||
#ifndef _ZLIBIOAPI_H
|
||||
#define _ZLIBIOAPI_H
|
||||
|
||||
|
||||
#define ZLIB_FILEFUNC_SEEK_CUR (1)
|
||||
#define ZLIB_FILEFUNC_SEEK_END (2)
|
||||
#define ZLIB_FILEFUNC_SEEK_SET (0)
|
||||
|
||||
#define ZLIB_FILEFUNC_MODE_READ (1)
|
||||
#define ZLIB_FILEFUNC_MODE_WRITE (2)
|
||||
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
|
||||
|
||||
#define ZLIB_FILEFUNC_MODE_EXISTING (4)
|
||||
#define ZLIB_FILEFUNC_MODE_CREATE (8)
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef voidpf (*open_file_func) (voidpf opaque, const char* filename, int mode);
|
||||
typedef uLong (*read_file_func) (voidpf opaque, voidpf stream, void* buf, uLong size);
|
||||
typedef uLong (*write_file_func) (voidpf opaque, voidpf stream, const void* buf, uLong size);
|
||||
typedef long (*tell_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef long (*seek_file_func) (voidpf opaque, voidpf stream, uLong offset, int origin);
|
||||
typedef int (*close_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef int (*testerror_file_func) (voidpf opaque, voidpf stream);
|
||||
|
||||
typedef struct zlib_filefunc_def_s
|
||||
{
|
||||
open_file_func zopen_file;
|
||||
read_file_func zread_file;
|
||||
write_file_func zwrite_file;
|
||||
tell_file_func ztell_file;
|
||||
seek_file_func zseek_file;
|
||||
close_file_func zclose_file;
|
||||
testerror_file_func zerror_file;
|
||||
voidpf opaque;
|
||||
} zlib_filefunc_def;
|
||||
|
||||
|
||||
|
||||
void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
|
||||
|
||||
#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
|
||||
#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
|
||||
#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
|
||||
#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
|
||||
#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
|
||||
#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
1450
deps/minizip/unzip.c
vendored
Normal file
1450
deps/minizip/unzip.c
vendored
Normal file
File diff suppressed because it is too large
Load Diff
161
deps/minizip/unzip.h
vendored
Normal file
161
deps/minizip/unzip.h
vendored
Normal file
@ -0,0 +1,161 @@
|
||||
/* unzip.h -- IO for uncompress .zip files using zlib
|
||||
Version 1.1, February 14h, 2010
|
||||
part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html )
|
||||
|
||||
Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html )
|
||||
|
||||
Modifications of Unzip for Zip64
|
||||
Copyright (C) 2007-2008 Even Rouault
|
||||
|
||||
Modifications for Zip64 support on both zip and unzip
|
||||
Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com )
|
||||
|
||||
For more info read MiniZip_info.txt
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
Condition of use and distribution are the same than zlib :
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
---------------------------------------------------------------------------------
|
||||
|
||||
Changes
|
||||
|
||||
See header of unzip64.c
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _unz64_H
|
||||
#define _unz64_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef _ZLIB_H
|
||||
#include "../miniz/zlib.h"
|
||||
#endif
|
||||
|
||||
#define Z_BZIP2ED 12
|
||||
|
||||
#define z_off_t long
|
||||
|
||||
#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
|
||||
/* like the STRICT of WIN32, we define a pointer that cannot be converted
|
||||
from (void*) without cast */
|
||||
typedef struct TagunzFile__ { int unused; } unzFile__;
|
||||
typedef unzFile__ *unzFile;
|
||||
#else
|
||||
typedef voidp unzFile;
|
||||
#endif
|
||||
|
||||
|
||||
#define UNZ_OK (0)
|
||||
#define UNZ_END_OF_LIST_OF_FILE (-100)
|
||||
#define UNZ_ERRNO (Z_ERRNO)
|
||||
#define UNZ_EOF (0)
|
||||
#define UNZ_PARAMERROR (-102UL)
|
||||
#define UNZ_BADZIPFILE (-103)
|
||||
#define UNZ_INTERNALERROR (-104)
|
||||
#define UNZ_CRCERROR (-105)
|
||||
|
||||
/* tm_unz contain date/time info */
|
||||
typedef struct tm_unz_s
|
||||
{
|
||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||
uInt tm_mday; /* day of the month - [1,31] */
|
||||
uInt tm_mon; /* months since January - [0,11] */
|
||||
uInt tm_year; /* years - [1980..2044] */
|
||||
} tm_unz;
|
||||
|
||||
/* unz_global_info structure contain global data about the ZIPfile
|
||||
These data comes from the end of central dir */
|
||||
typedef struct unz_global_info64_s
|
||||
{
|
||||
uLong number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
uLong size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info64;
|
||||
|
||||
typedef struct unz_global_info_s
|
||||
{
|
||||
uLong number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
uLong size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info;
|
||||
|
||||
/* unz_file_info contain information about a file in the zipfile */
|
||||
typedef struct unz_file_info64_s
|
||||
{
|
||||
uLong version; /* version made by 2 bytes */
|
||||
uLong version_needed; /* version needed to extract 2 bytes */
|
||||
uLong flag; /* general purpose bit flag 2 bytes */
|
||||
uLong compression_method; /* compression method 2 bytes */
|
||||
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||
uLong crc; /* crc-32 4 bytes */
|
||||
uLong compressed_size; /* compressed size 8 bytes */
|
||||
uLong uncompressed_size; /* uncompressed size 8 bytes */
|
||||
uLong size_filename; /* filename length 2 bytes */
|
||||
uLong size_file_extra; /* extra field length 2 bytes */
|
||||
uLong size_file_comment; /* file comment length 2 bytes */
|
||||
|
||||
uLong disk_num_start; /* disk number start 2 bytes */
|
||||
uLong internal_fa; /* internal file attributes 2 bytes */
|
||||
uLong external_fa; /* external file attributes 4 bytes */
|
||||
|
||||
tm_unz tmu_date;
|
||||
} unz_file_info64;
|
||||
|
||||
typedef struct unz_file_info_s
|
||||
{
|
||||
uLong version; /* version made by 2 bytes */
|
||||
uLong version_needed; /* version needed to extract 2 bytes */
|
||||
uLong flag; /* general purpose bit flag 2 bytes */
|
||||
uLong compression_method; /* compression method 2 bytes */
|
||||
uLong dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||
uLong crc; /* crc-32 4 bytes */
|
||||
uLong compressed_size; /* compressed size 4 bytes */
|
||||
uLong uncompressed_size; /* uncompressed size 4 bytes */
|
||||
uLong size_filename; /* filename length 2 bytes */
|
||||
uLong size_file_extra; /* extra field length 2 bytes */
|
||||
uLong size_file_comment; /* file comment length 2 bytes */
|
||||
|
||||
uLong disk_num_start; /* disk number start 2 bytes */
|
||||
uLong internal_fa; /* internal file attributes 2 bytes */
|
||||
uLong external_fa; /* external file attributes 4 bytes */
|
||||
|
||||
tm_unz tmu_date;
|
||||
} unz_file_info;
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/* Get the current file offset */
|
||||
extern uLong unzGetOffset64 (unzFile file);
|
||||
extern uLong unzGetOffset (unzFile file);
|
||||
|
||||
/* Set the current file offset */
|
||||
extern int unzSetOffset64 (unzFile file, uLong pos);
|
||||
extern int unzSetOffset (unzFile file, uLong pos);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _unz64_H */
|
3433
deps/rzlib/rzlib.c
vendored
3433
deps/rzlib/rzlib.c
vendored
File diff suppressed because it is too large
Load Diff
71
deps/rzlib/zconf.h
vendored
71
deps/rzlib/zconf.h
vendored
@ -1,71 +0,0 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2002 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* This source as presented is a modified version of original zlib for use with
|
||||
* RetroArch, and must not be confused with the original software. */
|
||||
|
||||
|
||||
#ifndef _ZCONF_H
|
||||
#define _ZCONF_H
|
||||
|
||||
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
|
||||
# define WIN32
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#if !defined(MACOS) && !defined(TARGET_OS_MAC)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
|
||||
typedef Byte Bytef;
|
||||
typedef void *voidpf;
|
||||
typedef void *voidp;
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# define z_off_t off_t
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#endif /* _ZCONF_H */
|
688
deps/rzlib/zlib.h
vendored
688
deps/rzlib/zlib.h
vendored
@ -1,688 +0,0 @@
|
||||
/* szlib.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2002 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* This source as presented is a modified version of original zlib for use with
|
||||
* RetroArch, and must not be confused with the original software. */
|
||||
|
||||
#ifndef _RZLIB_H
|
||||
#define _RZLIB_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include "zconf.h"
|
||||
|
||||
/* constants */
|
||||
#define ZLIB_VERSION "1.1.4"
|
||||
|
||||
#define Z_NO_FLUSH 0
|
||||
#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
|
||||
#define Z_SYNC_FLUSH 2
|
||||
#define Z_FULL_FLUSH 3
|
||||
#define Z_FINISH 4
|
||||
/* Allowed flush values; see deflate() below for details */
|
||||
|
||||
#define Z_OK 0
|
||||
#define Z_STREAM_END 1
|
||||
#define Z_NEED_DICT 2
|
||||
#define Z_ERRNO (-1)
|
||||
#define Z_STREAM_ERROR (-2)
|
||||
#define Z_DATA_ERROR (-3)
|
||||
#define Z_MEM_ERROR (-4)
|
||||
#define Z_BUF_ERROR (-5)
|
||||
#define Z_VERSION_ERROR (-6)
|
||||
|
||||
/* Return codes for the compression/decompression functions. Negative
|
||||
* values are errors, positive values are used for special but normal events.
|
||||
*/
|
||||
|
||||
#define Z_NO_COMPRESSION 0
|
||||
#define Z_BEST_SPEED 1
|
||||
#define Z_BEST_COMPRESSION 9
|
||||
#define Z_DEFAULT_COMPRESSION (-1)
|
||||
/* compression levels */
|
||||
|
||||
#define Z_FILTERED 1
|
||||
#define Z_HUFFMAN_ONLY 2
|
||||
#define Z_DEFAULT_STRATEGY 0
|
||||
|
||||
#define Z_BINARY 0
|
||||
#define Z_ASCII 1
|
||||
#define Z_UNKNOWN 2
|
||||
/* Possible values of the data_type field */
|
||||
|
||||
#define Z_DEFLATED 8
|
||||
/* The deflate compression method (the only one supported in this version) */
|
||||
|
||||
#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
|
||||
|
||||
#define zlib_version zlibVersion()
|
||||
/* for compatibility with versions < 1.0.2 */
|
||||
|
||||
typedef voidpf (*alloc_func) (voidpf opaque, unsigned int items, unsigned int size);
|
||||
typedef void (*free_func) (voidpf opaque, voidpf address);
|
||||
|
||||
typedef struct z_stream_s {
|
||||
Bytef *next_in; /* next input byte */
|
||||
unsigned int avail_in; /* number of bytes available at next_in */
|
||||
unsigned long total_in; /* total nb of input bytes read so far */
|
||||
|
||||
Bytef *next_out; /* next output byte should be put there */
|
||||
unsigned int avail_out; /* remaining free space at next_out */
|
||||
unsigned long total_out; /* total nb of bytes output so far */
|
||||
|
||||
char *msg; /* last error message, NULL if no error */
|
||||
struct internal_state *state; /* not visible by applications */
|
||||
|
||||
alloc_func zalloc; /* used to allocate the internal state */
|
||||
free_func zfree; /* used to free the internal state */
|
||||
voidpf opaque; /* private data object passed to zalloc and zfree */
|
||||
|
||||
int data_type; /* best guess about the data type: ascii or binary */
|
||||
unsigned long adler; /* adler32 value of the uncompressed data */
|
||||
unsigned long reserved; /* reserved for future use */
|
||||
} z_stream;
|
||||
|
||||
typedef z_stream *z_streamp;
|
||||
|
||||
typedef unsigned char uch;
|
||||
typedef unsigned char uchf;
|
||||
typedef unsigned short ush;
|
||||
typedef unsigned short ushf;
|
||||
typedef unsigned long ulg;
|
||||
|
||||
extern const char *z_errmsg[10]; /* indexed by 2-zlib_error */
|
||||
/* (size given to avoid silly warnings with Visual C++) */
|
||||
|
||||
#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)]
|
||||
|
||||
#define ERR_RETURN(strm,err) \
|
||||
return (strm->msg = (char*)ERR_MSG(err), (err))
|
||||
/* To be used only when the state is known to be valid */
|
||||
|
||||
/* common constants */
|
||||
|
||||
#ifndef DEF_WBITS
|
||||
# define DEF_WBITS MAX_WBITS
|
||||
#endif
|
||||
/* default windowBits for decompression. MAX_WBITS is for compression only */
|
||||
|
||||
#if MAX_MEM_LEVEL >= 8
|
||||
# define DEF_MEM_LEVEL 8
|
||||
#else
|
||||
# define DEF_MEM_LEVEL MAX_MEM_LEVEL
|
||||
#endif
|
||||
/* default memLevel */
|
||||
|
||||
#define STORED_BLOCK 0
|
||||
#define STATIC_TREES 1
|
||||
#define DYN_TREES 2
|
||||
/* The three kinds of block type */
|
||||
|
||||
#define MIN_MATCH 3
|
||||
#define MAX_MATCH 258
|
||||
/* The minimum and maximum match lengths */
|
||||
|
||||
#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */
|
||||
|
||||
/* target dependencies */
|
||||
|
||||
#ifdef WIN32 /* Window 95 & Windows NT */
|
||||
# define OS_CODE 0x0b
|
||||
#endif
|
||||
|
||||
#if defined(ATARI) || defined(atarist)
|
||||
# define OS_CODE 0x05
|
||||
#endif
|
||||
|
||||
#if defined(MACOS) || defined(TARGET_OS_MAC)
|
||||
# define OS_CODE 0x07
|
||||
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
|
||||
# include <unix.h> /* for fdopen */
|
||||
# else
|
||||
# ifndef fdopen
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __50SERIES /* Prime/PRIMOS */
|
||||
# define OS_CODE 0x0F
|
||||
#endif
|
||||
|
||||
#ifdef TOPS20
|
||||
# define OS_CODE 0x0a
|
||||
#endif
|
||||
|
||||
#if defined(_BEOS_) || defined(RISCOS)
|
||||
# define fdopen(fd,mode) NULL /* No fdopen() */
|
||||
#endif
|
||||
|
||||
#if (defined(_MSC_VER) && (_MSC_VER > 600))
|
||||
# define fdopen(fd,type) _fdopen(fd,type)
|
||||
#endif
|
||||
|
||||
/* Common defaults */
|
||||
|
||||
#ifndef OS_CODE
|
||||
# define OS_CODE 0x03 /* assume Unix */
|
||||
#endif
|
||||
|
||||
/* functions */
|
||||
|
||||
#ifdef HAVE_STRERROR
|
||||
extern char *strerror (int);
|
||||
# define zstrerror(errnum) strerror(errnum)
|
||||
#else
|
||||
# define zstrerror(errnum) ""
|
||||
#endif
|
||||
|
||||
typedef unsigned long ( *check_func) (unsigned long check, const Bytef *buf,
|
||||
unsigned int len);
|
||||
voidpf zcalloc (voidpf opaque, unsigned items, unsigned size);
|
||||
void zcfree (voidpf opaque, voidpf ptr);
|
||||
|
||||
#define ZALLOC(strm, items, size) \
|
||||
(*((strm)->zalloc))((strm)->opaque, (items), (size))
|
||||
#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
|
||||
|
||||
/* Huffman code lookup table entry--this entry is four bytes for machines
|
||||
that have 16-bit pointers (e.g. PC's in the small or medium model). */
|
||||
|
||||
typedef struct inflate_huft_s inflate_huft;
|
||||
|
||||
struct inflate_huft_s {
|
||||
union {
|
||||
struct {
|
||||
Byte Exop; /* number of extra bits or operation */
|
||||
Byte Bits; /* number of bits in this code or subcode */
|
||||
} what;
|
||||
unsigned int pad; /* pad structure to a power of 2 (4 bytes for */
|
||||
} word; /* 16-bit, 8 bytes for 32-bit int's) */
|
||||
unsigned int base; /* literal, length base, distance base,
|
||||
or table offset */
|
||||
};
|
||||
|
||||
/* Maximum size of dynamic tree. The maximum found in a long but non-
|
||||
exhaustive search was 1004 huft structures (850 for length/literals
|
||||
and 154 for distances, the latter actually the result of an
|
||||
exhaustive search). The actual maximum is not known, but the
|
||||
value below is more than safe. */
|
||||
#define MANY 1440
|
||||
|
||||
extern int inflate_trees_bits (
|
||||
unsigned int *, /* 19 code lengths */
|
||||
unsigned int *, /* bits tree desired/actual depth */
|
||||
inflate_huft **, /* bits tree result */
|
||||
inflate_huft *, /* space for trees */
|
||||
z_streamp); /* for messages */
|
||||
|
||||
extern int inflate_trees_dynamic (
|
||||
unsigned int, /* number of literal/length codes */
|
||||
unsigned int, /* number of distance codes */
|
||||
unsigned int *, /* that many (total) code lengths */
|
||||
unsigned int *, /* literal desired/actual bit depth */
|
||||
unsigned int *, /* distance desired/actual bit depth */
|
||||
inflate_huft **, /* literal/length tree result */
|
||||
inflate_huft **, /* distance tree result */
|
||||
inflate_huft *, /* space for trees */
|
||||
z_streamp); /* for messages */
|
||||
|
||||
extern int inflate_trees_fixed (
|
||||
unsigned int *, /* literal desired/actual bit depth */
|
||||
unsigned int *, /* distance desired/actual bit depth */
|
||||
inflate_huft **, /* literal/length tree result */
|
||||
inflate_huft **, /* distance tree result */
|
||||
z_streamp); /* for memory allocation */
|
||||
|
||||
struct inflate_blocks_state;
|
||||
typedef struct inflate_blocks_state inflate_blocks_statef;
|
||||
|
||||
extern inflate_blocks_statef * inflate_blocks_new (
|
||||
z_streamp z,
|
||||
check_func c, /* check function */
|
||||
unsigned int w); /* window size */
|
||||
|
||||
extern int inflate_blocks (
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
int); /* initial return code */
|
||||
|
||||
extern void inflate_blocks_reset (
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
unsigned long *); /* check value on output */
|
||||
|
||||
extern int inflate_blocks_free (
|
||||
inflate_blocks_statef *,
|
||||
z_streamp);
|
||||
|
||||
struct inflate_codes_state;
|
||||
typedef struct inflate_codes_state inflate_codes_statef;
|
||||
|
||||
extern inflate_codes_statef *inflate_codes_new (
|
||||
unsigned int, unsigned int,
|
||||
inflate_huft *, inflate_huft *,
|
||||
z_streamp );
|
||||
|
||||
extern int inflate_codes (
|
||||
inflate_blocks_statef *,
|
||||
z_streamp ,
|
||||
int);
|
||||
|
||||
typedef enum {
|
||||
TYPE, /* get type bits (3, including end bit) */
|
||||
LENS, /* get lengths for stored */
|
||||
STORED, /* processing stored block */
|
||||
TABLE, /* get table lengths */
|
||||
BTREE, /* get bit lengths tree for a dynamic block */
|
||||
DTREE, /* get length, distance trees for a dynamic block */
|
||||
CODES, /* processing fixed or dynamic block */
|
||||
DRY, /* output remaining window bytes */
|
||||
DONE, /* finished last block, done */
|
||||
BAD} /* got a data error--stuck here */
|
||||
inflate_block_mode;
|
||||
|
||||
/* inflate blocks semi-private state */
|
||||
struct inflate_blocks_state {
|
||||
|
||||
/* mode */
|
||||
inflate_block_mode mode; /* current inflate_block mode */
|
||||
|
||||
/* mode dependent information */
|
||||
union {
|
||||
unsigned int left; /* if STORED, bytes left to copy */
|
||||
struct {
|
||||
unsigned int table; /* table lengths (14 bits) */
|
||||
unsigned int index; /* index into blens (or border) */
|
||||
unsigned int *blens; /* bit lengths of codes */
|
||||
unsigned int bb; /* bit length tree depth */
|
||||
inflate_huft *tb; /* bit length decoding tree */
|
||||
} trees; /* if DTREE, decoding info for trees */
|
||||
struct {
|
||||
inflate_codes_statef
|
||||
*codes;
|
||||
} decode; /* if CODES, current state */
|
||||
} sub; /* submode */
|
||||
unsigned int last; /* true if this block is the last block */
|
||||
|
||||
/* mode independent information */
|
||||
unsigned int bitk; /* bits in bit buffer */
|
||||
unsigned long bitb; /* bit buffer */
|
||||
inflate_huft *hufts; /* single malloc for tree space */
|
||||
Bytef *window; /* sliding window */
|
||||
Bytef *end; /* one byte after sliding window */
|
||||
Bytef *read; /* window read pointer */
|
||||
Bytef *write; /* window write pointer */
|
||||
check_func checkfn; /* check function */
|
||||
unsigned long check; /* check on output */
|
||||
|
||||
};
|
||||
|
||||
extern int inflate(z_streamp z, int f);
|
||||
extern int inflateEnd(z_streamp z);
|
||||
|
||||
|
||||
/* defines for inflate input/output */
|
||||
/* update pointers and return */
|
||||
#define UPDBITS {s->bitb=b;s->bitk=k;}
|
||||
#define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
|
||||
#define UPDOUT {s->write=q;}
|
||||
#define UPDATE {UPDBITS UPDIN UPDOUT}
|
||||
#define LEAVE {UPDATE return inflate_flush(s,z,r);}
|
||||
/* get bytes and bits */
|
||||
#define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
|
||||
#define NEEDBYTE {if(n)r=Z_OK;else LEAVE}
|
||||
#define NEXTBYTE (n--,*p++)
|
||||
#define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((unsigned long)NEXTBYTE)<<k;k+=8;}}
|
||||
#define DUMPBITS(j) {b>>=(j);k-=(j);}
|
||||
/* output bytes */
|
||||
#define WAVAIL (unsigned int)(q<s->read?s->read-q-1:s->end-q)
|
||||
#define LOADOUT {q=s->write;m=(unsigned int)WAVAIL;}
|
||||
#define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(unsigned int)WAVAIL;}}
|
||||
#define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
|
||||
#define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
|
||||
#define OUTBYTE(a) {*q++=(Byte)(a);m--;}
|
||||
/* load local pointers */
|
||||
#define LOAD {LOADIN LOADOUT}
|
||||
|
||||
/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
|
||||
extern unsigned int inflate_mask[17];
|
||||
|
||||
/* copy as much as possible from the sliding window to the output area */
|
||||
extern int inflate_flush (inflate_blocks_statef *, z_streamp , int);
|
||||
|
||||
// utility functions
|
||||
|
||||
extern voidp gzopen (const char *path, const char *mode);
|
||||
extern voidp gzdopen (int fd, const char *mode);
|
||||
extern int gzread (voidp file, voidp buf, unsigned len);
|
||||
extern int gzwrite (voidp file, const voidp buf, unsigned len);
|
||||
extern int gzprintf (voidp file, const char *format, ...);
|
||||
extern int gzputs (voidp file, const char *s);
|
||||
extern char * gzgets (voidp file, char *buf, int len);
|
||||
extern int gzputc (voidp file, int c);
|
||||
extern int gzgetc (voidp file);
|
||||
extern int gzflush (voidp file, int flush);
|
||||
extern z_off_t gzseek (voidp file, z_off_t offset, int whence);
|
||||
extern int gzrewind (voidp file);
|
||||
extern z_off_t gztell (voidp file);
|
||||
extern int gzeof (voidp file);
|
||||
extern int gzclose (voidp file);
|
||||
|
||||
extern const char * gzerror (voidp file, int *errnum);
|
||||
|
||||
/* checksum functions */
|
||||
|
||||
extern unsigned long adler32 (unsigned long adler, const Bytef *buf, unsigned int len);
|
||||
extern unsigned long crc32 (unsigned long crc, const Bytef *buf, unsigned int len);
|
||||
|
||||
/* various hacks, don't look :) */
|
||||
|
||||
extern int inflateInit_ (z_streamp strm, const char * version, int stream_size);
|
||||
extern int inflateInit2_ (z_streamp strm, int windowBits, const char *version, int stream_size);
|
||||
|
||||
#define inflateInit(strm) \
|
||||
inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
|
||||
#define inflateInit2(strm, windowBits) \
|
||||
inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
|
||||
|
||||
#if (!defined(_WIN32)) && (!defined(WIN32))
|
||||
|
||||
// Linux needs this to support file operation on files larger then 4+GB
|
||||
// But might need better if/def to select just the platforms that needs them.
|
||||
|
||||
#ifndef __USE_FILE_OFFSET64
|
||||
#define __USE_FILE_OFFSET64
|
||||
#endif
|
||||
#ifndef __USE_LARGEFILE64
|
||||
#define __USE_LARGEFILE64
|
||||
#endif
|
||||
#ifndef _LARGEFILE64_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
#ifndef _FILE_OFFSET_BIT
|
||||
#define _FILE_OFFSET_BIT 64
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_FILE32API)
|
||||
#define fopen64 fopen
|
||||
#define ftello64 ftell
|
||||
#define fseeko64 fseek
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#define fopen64 fopen
|
||||
#if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC)))
|
||||
#define ftello64 _ftelli64
|
||||
#define fseeko64 _fseeki64
|
||||
#else // old MSC
|
||||
#define ftello64 ftell
|
||||
#define fseeko64 fseek
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MINIZIP64_CONF_H
|
||||
#include "mz64conf.h"
|
||||
#endif
|
||||
|
||||
/* a type choosen by DEFINE */
|
||||
#ifdef HAVE_64BIT_INT_CUSTOM
|
||||
typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T;
|
||||
#else
|
||||
#ifdef HAS_STDINT_H
|
||||
#include "stdint.h"
|
||||
typedef uint64_t ZPOS64_T;
|
||||
#else
|
||||
|
||||
#if defined(_MSC_VER) || defined(__BORLANDC__)
|
||||
typedef unsigned __int64 ZPOS64_T;
|
||||
#else
|
||||
typedef unsigned long long int ZPOS64_T;
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define ZLIB_FILEFUNC_SEEK_CUR (1)
|
||||
#define ZLIB_FILEFUNC_SEEK_END (2)
|
||||
#define ZLIB_FILEFUNC_SEEK_SET (0)
|
||||
|
||||
#define ZLIB_FILEFUNC_MODE_READ (1)
|
||||
#define ZLIB_FILEFUNC_MODE_WRITE (2)
|
||||
#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
|
||||
|
||||
#define ZLIB_FILEFUNC_MODE_EXISTING (4)
|
||||
#define ZLIB_FILEFUNC_MODE_CREATE (8)
|
||||
|
||||
typedef voidpf ( *open_file_func) (voidpf opaque, const char* filename, int mode);
|
||||
typedef unsigned long ( *read_file_func) (voidpf opaque, voidpf stream, void* buf, unsigned long size);
|
||||
typedef unsigned long ( *write_file_func) (voidpf opaque, voidpf stream, const void* buf, unsigned long size);
|
||||
typedef int ( *close_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef int ( *testerror_file_func) (voidpf opaque, voidpf stream);
|
||||
|
||||
typedef long ( *tell_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef long ( *seek_file_func) (voidpf opaque, voidpf stream, unsigned long offset, int origin);
|
||||
|
||||
|
||||
/* here is the "old" 32 bits structure structure */
|
||||
typedef struct zlib_filefunc_def_s
|
||||
{
|
||||
open_file_func zopen_file;
|
||||
read_file_func zread_file;
|
||||
write_file_func zwrite_file;
|
||||
tell_file_func ztell_file;
|
||||
seek_file_func zseek_file;
|
||||
close_file_func zclose_file;
|
||||
testerror_file_func zerror_file;
|
||||
voidpf opaque;
|
||||
} zlib_filefunc_def;
|
||||
|
||||
typedef ZPOS64_T ( *tell64_file_func) (voidpf opaque, voidpf stream);
|
||||
typedef long ( *seek64_file_func) (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin);
|
||||
typedef voidpf ( *open64_file_func) (voidpf opaque, const void* filename, int mode);
|
||||
|
||||
typedef struct zlib_filefunc64_def_s
|
||||
{
|
||||
open64_file_func zopen64_file;
|
||||
read_file_func zread_file;
|
||||
write_file_func zwrite_file;
|
||||
tell64_file_func ztell64_file;
|
||||
seek64_file_func zseek64_file;
|
||||
close_file_func zclose_file;
|
||||
testerror_file_func zerror_file;
|
||||
voidpf opaque;
|
||||
} zlib_filefunc64_def;
|
||||
|
||||
void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
void fill_fopen_filefunc (zlib_filefunc_def* pzlib_filefunc_def);
|
||||
|
||||
/* now internal definition, only for zip.c and unzip.h */
|
||||
typedef struct zlib_filefunc64_32_def_s
|
||||
{
|
||||
zlib_filefunc64_def zfile_func64;
|
||||
open_file_func zopen32_file;
|
||||
tell_file_func ztell32_file;
|
||||
seek_file_func zseek32_file;
|
||||
} zlib_filefunc64_32_def;
|
||||
|
||||
#define ZREAD(filefunc,filestream,buf,size) ((*((filefunc).zread_file))((filefunc).opaque,filestream,buf,size))
|
||||
#define ZWRITE(filefunc,filestream,buf,size) ((*((filefunc).zwrite_file))((filefunc).opaque,filestream,buf,size))
|
||||
#define ZTELL(filefunc,filestream) ((*((filefunc).ztell_file))((filefunc).opaque,filestream))
|
||||
#define ZSEEK(filefunc,filestream,pos,mode) ((*((filefunc).zseek_file))((filefunc).opaque,filestream,pos,mode))
|
||||
#define ZCLOSE(filefunc,filestream) ((*((filefunc).zclose_file))((filefunc).opaque,filestream))
|
||||
#define ZERROR(filefunc,filestream) ((*((filefunc).zerror_file))((filefunc).opaque,filestream))
|
||||
|
||||
voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode);
|
||||
long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin);
|
||||
ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream);
|
||||
|
||||
void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32);
|
||||
|
||||
#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode)))
|
||||
#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream)))
|
||||
#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode)))
|
||||
|
||||
#define Z_BZIP2ED 12
|
||||
|
||||
typedef voidp unzFile;
|
||||
|
||||
#define UNZ_OK (0)
|
||||
#define UNZ_END_OF_LIST_OF_FILE (-100)
|
||||
#define UNZ_ERRNO (Z_ERRNO)
|
||||
#define UNZ_EOF (0)
|
||||
#define UNZ_PARAMERROR (-102)
|
||||
#define UNZ_PARAMERROR_UL (-102UL)
|
||||
#define UNZ_BADZIPFILE (-103)
|
||||
#define UNZ_INTERNALERROR (-104)
|
||||
#define UNZ_CRCERROR (-105)
|
||||
|
||||
/* tm_unz contain date/time info */
|
||||
typedef struct tm_unz_s
|
||||
{
|
||||
unsigned int tm_sec; /* seconds after the minute - [0,59] */
|
||||
unsigned int tm_min; /* minutes after the hour - [0,59] */
|
||||
unsigned int tm_hour; /* hours since midnight - [0,23] */
|
||||
unsigned int tm_mday; /* day of the month - [1,31] */
|
||||
unsigned int tm_mon; /* months since January - [0,11] */
|
||||
unsigned int tm_year; /* years - [1980..2044] */
|
||||
} tm_unz;
|
||||
|
||||
/* unz_global_info structure contain global data about the ZIPfile
|
||||
These data comes from the end of central dir */
|
||||
typedef struct unz_global_info64_s
|
||||
{
|
||||
ZPOS64_T number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
unsigned long size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info64;
|
||||
|
||||
typedef struct unz_global_info_s
|
||||
{
|
||||
unsigned long number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
unsigned long size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info;
|
||||
|
||||
/* unz_file_info contain information about a file in the zipfile */
|
||||
typedef struct unz_file_info64_s
|
||||
{
|
||||
unsigned long version; /* version made by 2 bytes */
|
||||
unsigned long version_needed; /* version needed to extract 2 bytes */
|
||||
unsigned long flag; /* general purpose bit flag 2 bytes */
|
||||
unsigned long compression_method; /* compression method 2 bytes */
|
||||
unsigned long dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||
unsigned long crc; /* crc-32 4 bytes */
|
||||
ZPOS64_T compressed_size; /* compressed size 8 bytes */
|
||||
ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */
|
||||
unsigned long size_filename; /* filename length 2 bytes */
|
||||
unsigned long size_file_extra; /* extra field length 2 bytes */
|
||||
unsigned long size_file_comment; /* file comment length 2 bytes */
|
||||
|
||||
unsigned long disk_num_start; /* disk number start 2 bytes */
|
||||
unsigned long internal_fa; /* internal file attributes 2 bytes */
|
||||
unsigned long external_fa; /* external file attributes 4 bytes */
|
||||
|
||||
tm_unz tmu_date;
|
||||
} unz_file_info64;
|
||||
|
||||
typedef struct unz_file_info_s
|
||||
{
|
||||
unsigned long version; /* version made by 2 bytes */
|
||||
unsigned long version_needed; /* version needed to extract 2 bytes */
|
||||
unsigned long flag; /* general purpose bit flag 2 bytes */
|
||||
unsigned long compression_method; /* compression method 2 bytes */
|
||||
unsigned long dosDate; /* last mod file date in Dos fmt 4 bytes */
|
||||
unsigned long crc; /* crc-32 4 bytes */
|
||||
unsigned long compressed_size; /* compressed size 4 bytes */
|
||||
unsigned long uncompressed_size; /* uncompressed size 4 bytes */
|
||||
unsigned long size_filename; /* filename length 2 bytes */
|
||||
unsigned long size_file_extra; /* extra field length 2 bytes */
|
||||
unsigned long size_file_comment; /* file comment length 2 bytes */
|
||||
|
||||
unsigned long disk_num_start; /* disk number start 2 bytes */
|
||||
unsigned long internal_fa; /* internal file attributes 2 bytes */
|
||||
unsigned long external_fa; /* external file attributes 4 bytes */
|
||||
|
||||
tm_unz tmu_date;
|
||||
} unz_file_info;
|
||||
|
||||
extern int unzStringFileNameCompare (const char* fileName1, const char* fileName2, int iCaseSensitivity);
|
||||
extern unzFile unzOpen (const char *path);
|
||||
extern unzFile unzOpen64 (const void *path);
|
||||
extern unzFile unzOpen2 (const char *path, zlib_filefunc_def* pzlib_filefunc_def);
|
||||
|
||||
extern unzFile unzOpen2_64 (const void *path, zlib_filefunc64_def* pzlib_filefunc_def);
|
||||
extern int unzClose (unzFile file);
|
||||
extern int unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info);
|
||||
extern int unzGetGlobalInfo64 (unzFile file, unz_global_info64 *pglobal_info);
|
||||
extern int unzGetGlobalComment (unzFile file, char *szComment, unsigned long uSizeBuf);
|
||||
extern int unzGoToFirstFile (unzFile file);
|
||||
extern int unzGoToNextFile (unzFile file);
|
||||
extern int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity);
|
||||
|
||||
typedef struct unz_file_pos_s
|
||||
{
|
||||
unsigned long pos_in_zip_directory; /* offset in zip file directory */
|
||||
unsigned long num_of_file; /* # of file */
|
||||
} unz_file_pos;
|
||||
|
||||
extern int unzGetFilePos(unzFile file, unz_file_pos* file_pos);
|
||||
extern int unzGoToFilePos(unzFile file, unz_file_pos* file_pos);
|
||||
|
||||
typedef struct unz64_file_pos_s
|
||||
{
|
||||
ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */
|
||||
ZPOS64_T num_of_file; /* # of file */
|
||||
} unz64_file_pos;
|
||||
|
||||
extern int unzGetFilePos64(unzFile file, unz64_file_pos* file_pos);
|
||||
extern int unzGoToFilePos64(unzFile file, const unz64_file_pos* file_pos);
|
||||
|
||||
extern int unzGetCurrentFileInfo64 (unzFile file,
|
||||
unz_file_info64 *pfile_info,
|
||||
char *szFileName,
|
||||
unsigned long fileNameBufferSize,
|
||||
void *extraField,
|
||||
unsigned long extraFieldBufferSize,
|
||||
char *szComment,
|
||||
unsigned long commentBufferSize);
|
||||
|
||||
extern int unzGetCurrentFileInfo (unzFile file,
|
||||
unz_file_info *pfile_info,
|
||||
char *szFileName,
|
||||
unsigned long fileNameBufferSize,
|
||||
void *extraField,
|
||||
unsigned long extraFieldBufferSize,
|
||||
char *szComment,
|
||||
unsigned long commentBufferSize);
|
||||
|
||||
extern ZPOS64_T unzGetCurrentFileZStreamPos64 (unzFile file);
|
||||
extern int unzOpenCurrentFile (unzFile file);
|
||||
extern int unzOpenCurrentFilePassword (unzFile file, const char* password);
|
||||
extern int unzOpenCurrentFile2 (unzFile file, int* method, int* level, int raw);
|
||||
extern int unzOpenCurrentFile3 (unzFile file, int* method, int* level, int raw, const char* password);
|
||||
extern int unzCloseCurrentFile (unzFile file);
|
||||
extern int unzReadCurrentFile (unzFile file, voidp buf, unsigned len);
|
||||
extern z_off_t unztell (unzFile file);
|
||||
extern ZPOS64_T unztell64 (unzFile file);
|
||||
extern int unzeof (unzFile file);
|
||||
extern int unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len);
|
||||
|
||||
/* Get the current file offset */
|
||||
extern ZPOS64_T unzGetOffset64 (unzFile file);
|
||||
extern unsigned long unzGetOffset (unzFile file);
|
||||
|
||||
/* Set the current file offset */
|
||||
extern int unzSetOffset64 (unzFile file, ZPOS64_T pos);
|
||||
extern int unzSetOffset (unzFile file, unsigned long pos);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _RZLIB_H */
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
RARCH_VERSION=0.9.8.3
|
||||
RARCH_VERSION=0.9.8.4
|
||||
|
||||
make -C ../ -f Makefile.ps3.salamander clean || exit 1
|
||||
make -C ../ -f Makefile.ps3.rgl clean || exit 1
|
||||
|
@ -111,7 +111,7 @@ For more information about them, see the included
|
||||
- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP]
|
||||
- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive |
|
||||
Sega CD) [version 1.7.3]
|
||||
- SNES9x Next (Super Nintendo/Super Famicom)
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.4)
|
||||
- VBA Next (Game Boy Advance)
|
||||
- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom)
|
||||
- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16)
|
||||
|
@ -2,12 +2,50 @@ RETROARCH CONSOLE
|
||||
------------------------------------------------------------------------------
|
||||
v0.9.8.4
|
||||
------------------------------------------------------------------------------
|
||||
* [NEStopia] Famicom Disk System support. For Android users - put disksys.rom
|
||||
into the same folder as the FDS ROM you're trying to load. For everyone else -
|
||||
put disksys.rom into your system directory.
|
||||
- Y Button will switch sides of a disk.
|
||||
- If you get any problems of the sort DISK A / B ERR 07' - pressing Y button again or letting it run its course should do it.
|
||||
- NOTE - Famicom Disk System loading is slow, so you might be tempted to fast forward through most of it. However, I'd advise caution when doing so and to savestate regularly in case 'fast forwarding' can negatively affect disk loading.
|
||||
* [FBA core] Various changes/fixes
|
||||
- Hook up Eco Fighters controls (Turn 1/Turn 2 bound to L and R buttons)
|
||||
- Hook up Pnickie controls (Turn 1/Turn 2 bound to L and R buttons - press
|
||||
one of the buttons to progress beyond start screen)
|
||||
- Hook up Continental Circus controls - Brake 2/Brake 3 (L1/L2 buttons)
|
||||
and Accelerate 2/Accelerate 3 (R1/R2 buttons)
|
||||
- Hook up Gun Smoke controls - Start button (needed to progress beyond
|
||||
title screen)
|
||||
- Hook up Mighty Pang controls (P1 Shot1/P1 Shot2/P2 Shot1/P2 Shot2)
|
||||
- Fixed Varia Metal palette
|
||||
- Fixed Fairyland Story palette
|
||||
- Fixed Return of the Invaders palette
|
||||
- Fixed Act-Fancer palette issue
|
||||
- Endian fixes in the following games (PS3/360/Wii/Gamecube) -
|
||||
- Surprise Attack
|
||||
- Rollergames
|
||||
- Ultra Man
|
||||
- Oh My Gods
|
||||
- Moonwalker (Sega System 18 bootleg) [magicseb]
|
||||
- Hyper Pac
|
||||
- Snow Bros 1
|
||||
- Honey Dolls
|
||||
- Fixes pitch issue in Gals Hustle (will possibly fix more games as well)
|
||||
* [FBA core] [For Wii/Gamecube/Xbox 1 only] The main FBA version now has CPS1/CPS2/
|
||||
Neogeo and Mega Drive/PC Engine drivers removed. To play CPS1, use FBA Cores CPS1.
|
||||
To play CPS2, use FBA Cores CPS2. To play NeoGoe, use FBA Cores Neo.
|
||||
To play CPS2, use FBA Cores CPS2. To play NeoGeo, use FBA Cores Neo.
|
||||
* [FBA core] Made FBA Cores CPS1 - use this to play CPS1 games (all CPS1 ROMs
|
||||
fit into memory on Gamecube).
|
||||
* [Android] Fixed regression where a button bound to AKEYCODE_BACK would 'exit out'
|
||||
of RetroArch.
|
||||
* [Android] Fixes Madcatz fighting stick being autodetected properly.
|
||||
* [Android] Input autodetection expanded -
|
||||
- iControlpad
|
||||
* [Gamecube] Made RetroArch cores 'standalone' - ie. no core switching.
|
||||
* [Xbox 1] Add Low RAM mode - this needs to be used to play games that won't otherwise fit into RAM,
|
||||
such as Street Fighter Alpha 3/Vampire Savior and other big ROMs in FBA Cores CPS2/NeoGeo/FBA.
|
||||
* [Unzipping [All consoles/Android]] Moved from rzlib to miniz/minizip -should increase compatibility
|
||||
with ZIP archives
|
||||
------------------------------------------------------------------------------
|
||||
v0.9.8.3
|
||||
------------------------------------------------------------------------------
|
||||
|
@ -131,7 +131,7 @@ For more information about them, see the included
|
||||
- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP]
|
||||
- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive |
|
||||
Sega CD) [version 1.7.3]
|
||||
- SNES9x Next (Super Nintendo/Super Famicom)
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.4)
|
||||
- VBA Next (Game Boy Advance) (*)
|
||||
- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom)
|
||||
- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16)
|
||||
|
@ -145,7 +145,7 @@ For more information about them, see the included
|
||||
- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP]
|
||||
- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive |
|
||||
Sega CD) [version 1.7.3]
|
||||
- SNES9x Next (Super Nintendo/Super Famicom)
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.4)
|
||||
- VBA Next (Game Boy Advance)
|
||||
- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom)
|
||||
- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16)
|
||||
|
@ -140,7 +140,7 @@ For more information about them, see the included
|
||||
- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP]
|
||||
- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive |
|
||||
Sega CD) [version 1.7.3]
|
||||
- SNES9x Next (Super Nintendo/Super Famicom)
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.4)
|
||||
- VBA Next (Game Boy Advance) (*)
|
||||
- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom)
|
||||
- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16)
|
||||
|
@ -128,7 +128,7 @@ For more information about them, see the included
|
||||
- Gambatte (Game Boy | Super Game Boy | Game Boy Color) [version 0.5.0 WIP]
|
||||
- Genesis Plus GX (Sega SG-1000 | Master System | Game Gear | Genesis/Mega Drive |
|
||||
Sega CD) [version 1.7.3]
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.3) (**)
|
||||
- SNES9x Next (Super Nintendo/Super Famicom) (v1.52.4) (**)
|
||||
- VBA Next (Game Boy Advance) (*)
|
||||
- Prboom (for playing Doom 1/Doom 2/Ultimate Doom/Final Doom)
|
||||
- Mednafen PCE Fast (PC Engine/PC Engine CD/Turbografx 16)
|
||||
@ -143,8 +143,6 @@ without these optimizations).
|
||||
* - VBA Next doesn't run at fullspeed on Wii (VBA Next is a RetroConsole
|
||||
Level 2 emulator port). It will be replaced by a port of gpSP in the near
|
||||
future.
|
||||
** - SuperFX games will not run at fullspeed - a special version of SNES9x
|
||||
will be developed for Retro Console Level 1 systems.
|
||||
*** The biggest Neo-Geo ROMs that can be loaded are around 23+MB in
|
||||
size, such as Real Bout Fatal Fury 1 and King of Fighters '96.
|
||||
|
||||
|
19
dist-scripts/xdk1-cores.sh
Normal file
19
dist-scripts/xdk1-cores.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
ip='192.168.1.10'
|
||||
|
||||
#make -C ../ -f Makefile.wii.salamander clean || exit 1
|
||||
#make -C ../ -f Makefile.wii clean || exit 1
|
||||
|
||||
#make -C ../ -f Makefile.wii.salamander || exit 1
|
||||
#make -C ../ -f Makefile.wii.salamander pkg || exit 1
|
||||
mkdir -p ../msvc/RetroArch-Xbox1/Debug
|
||||
mkdir -p ../msvc/RetroArch-Xbox1/Release
|
||||
mkdir -p ../msvc/RetroArch-Xbox1/Release_LTCG
|
||||
|
||||
for f in *_xdk.lib ; do
|
||||
name=`echo "$f" | sed 's/\(_libretro\|\)_xdk.lib$//'`
|
||||
echo $name
|
||||
cp -f "$f" ../msvc/RetroArch-Xbox1/Release_LTCG/libretro_xdk.lib
|
||||
cmd.exe /k xdk1_env.bat $name
|
||||
done
|
51
dist-scripts/xdk1_env.bat
Normal file
51
dist-scripts/xdk1_env.bat
Normal file
@ -0,0 +1,51 @@
|
||||
@SET VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE
|
||||
@SET VCINSTALLDIR=C:\Program Files\Microsoft Visual Studio .NET 2003
|
||||
@SET FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
|
||||
@SET FrameworkVersion=v1.1.4322
|
||||
@SET FrameworkSDKDir=C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1
|
||||
@rem Root of Visual Studio common files.
|
||||
|
||||
@if "%VSINSTALLDIR%"=="" goto Usage
|
||||
@if "%VCINSTALLDIR%"=="" set VCINSTALLDIR=%VSINSTALLDIR%
|
||||
|
||||
@rem
|
||||
@rem Root of Visual Studio ide installed files.
|
||||
@rem
|
||||
@set DevEnvDir=%VSINSTALLDIR%
|
||||
|
||||
@rem
|
||||
@rem Root of Visual C++ installed files.
|
||||
@rem
|
||||
@set MSVCDir=%VCINSTALLDIR%\VC7
|
||||
|
||||
@rem
|
||||
@echo Setting environment for using Microsoft Visual Studio .NET 2003 tools.
|
||||
@echo (If you have another version of Visual Studio or Visual C++ installed and wish
|
||||
@echo to use its tools from the command line, run vcvars32.bat for that version.)
|
||||
@rem
|
||||
|
||||
@REM %VCINSTALLDIR%\Common7\Tools dir is added only for real setup.
|
||||
|
||||
@set PATH=%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;
|
||||
@set INCLUDE=%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%FrameworkSDKDir%\include;%INCLUDE%;%XDK%\xbox\include
|
||||
@set LIB=%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib;%XDK%\lib;%XDK%\xbox\lib;%LIB%
|
||||
|
||||
@goto end
|
||||
|
||||
:Usage
|
||||
|
||||
@echo. VSINSTALLDIR variable is not set.
|
||||
@echo.
|
||||
@echo SYNTAX: %0
|
||||
|
||||
@goto end
|
||||
|
||||
:end
|
||||
|
||||
cd ../msvc/
|
||||
devenv /clean Release_LTCG RetroArch-Xbox1.sln
|
||||
devenv /build Release_LTCG RetroArch-Xbox1.sln
|
||||
copy RetroArch-Xbox1\Release_LTCG\RetroArch.xbe RetroArch-Xbox1\%1.xbe
|
||||
del RetroArch-Xbox1\Release_LTCG\RetroArch.xbe
|
||||
del RetroArch-Xbox1\Release_LTCG\libretro_xdk.lib
|
||||
exit
|
26
driver.c
26
driver.c
@ -23,6 +23,7 @@
|
||||
#include "compat/posix_string.h"
|
||||
#include "audio/utils.h"
|
||||
#include "audio/resampler.h"
|
||||
#include "gfx/thread_wrapper.h"
|
||||
|
||||
#ifdef HAVE_X11
|
||||
#include "gfx/context/x11_common.h"
|
||||
@ -426,7 +427,7 @@ void init_audio(void)
|
||||
g_extern.audio_data.data_ptr = 0;
|
||||
|
||||
rarch_assert(g_settings.audio.out_rate < g_settings.audio.in_rate * AUDIO_MAX_RATIO);
|
||||
rarch_assert(g_extern.audio_data.outsamples = (sample_t*)malloc(outsamples_max * sizeof(sample_t)));
|
||||
rarch_assert(g_extern.audio_data.outsamples = (float*)malloc(outsamples_max * sizeof(float)));
|
||||
|
||||
if (g_extern.audio_active && g_settings.audio.rate_control)
|
||||
{
|
||||
@ -495,6 +496,12 @@ static void compute_audio_buffer_statistics(void)
|
||||
|
||||
static void compute_monitor_fps_statistics(void)
|
||||
{
|
||||
if (g_settings.video.threaded)
|
||||
{
|
||||
RARCH_LOG("Monitor FPS estimation is disabled for threaded video.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_extern.measure_data.frame_time_samples_count < 2 * MEASURE_FRAME_TIME_SAMPLES_COUNT)
|
||||
{
|
||||
RARCH_LOG("Does not have enough samples for monitor refresh rate estimation. Requires to run for at least %u frames.\n",
|
||||
@ -803,7 +810,22 @@ void init_video_input(void)
|
||||
video.rgb32 = g_extern.filter.active || (g_extern.system.pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888);
|
||||
|
||||
const input_driver_t *tmp = driver.input;
|
||||
driver.video_data = video_init_func(&video, &driver.input, &driver.input_data);
|
||||
#ifdef HAVE_THREADS
|
||||
if (g_settings.video.threaded)
|
||||
{
|
||||
find_video_driver(); // Need to grab the "real" video driver interface on a reinit.
|
||||
RARCH_LOG("Starting threaded video driver ...\n");
|
||||
if (!rarch_threaded_video_init(&driver.video, &driver.video_data,
|
||||
&driver.input, &driver.input_data,
|
||||
driver.video, &video))
|
||||
{
|
||||
RARCH_ERR("Cannot open threaded video driver ... Exiting ...\n");
|
||||
rarch_fail(1, "init_video_input()");
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
driver.video_data = video_init_func(&video, &driver.input, &driver.input_data);
|
||||
|
||||
if (driver.video_data == NULL)
|
||||
{
|
||||
|
2
driver.h
2
driver.h
@ -280,6 +280,8 @@ typedef struct driver
|
||||
void *video_data;
|
||||
void *input_data;
|
||||
|
||||
bool threaded_video;
|
||||
|
||||
// Set if the respective handles are owned by RetroArch driver core.
|
||||
// Consoles upper logic will generally intialize the drivers before
|
||||
// the driver core initializes. It will then be up to upper logic
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef _RARCH_DRIVER_FUNCS_H
|
||||
#define _RARCH_DRIVER_FUNCS_H
|
||||
|
||||
#if !defined(HAVE_GRIFFIN) /* Normal */
|
||||
#if !defined(HAVE_GRIFFIN) || defined(ANDROID) /* Normal */
|
||||
|
||||
#define audio_init_func(device, rate, latency) driver.audio->init(device, rate, latency)
|
||||
#define audio_write_func(buf, size) driver.audio->write(driver.audio_data, buf, size)
|
||||
|
6
file.c
6
file.c
@ -542,6 +542,12 @@ static bool load_roms(unsigned rom_type, const char **rom_paths, size_t roms)
|
||||
{
|
||||
RARCH_LOG("Loading ROM file: %s.\n", rom_paths[0]);
|
||||
rom_file = fopen(rom_paths[0], "rb");
|
||||
if (!rom_file)
|
||||
{
|
||||
RARCH_ERR("Failed to load ROM file: %s.\n", rom_paths[0]);
|
||||
ret = false;
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
if (!g_extern.system.info.need_fullpath)
|
||||
|
2
file.h
2
file.h
@ -97,6 +97,8 @@ bool path_is_absolute(const char *path);
|
||||
// E.g.: in_path = "/foo/bar/baz/boo.c", replace = "" => out_path = "/foo/bar/baz/boo"
|
||||
void fill_pathname(char *out_path, const char *in_path, const char *replace, size_t size);
|
||||
|
||||
void fill_dated_filename(char *out_filename, const char *ext, size_t size);
|
||||
|
||||
// Appends a filename extension 'replace' to 'in_path', and outputs result in 'out_path'.
|
||||
// Assumes in_path has no extension. If an extension is still present in 'in_path', it will be ignored.
|
||||
// 'size' is buffer size of 'out_path'.
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WANT_RZLIB
|
||||
#include "deps/rzlib/zlib.h"
|
||||
#ifdef WANT_MINIZ
|
||||
#include "deps/miniz/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
@ -460,6 +460,15 @@ void fill_pathname_parent_dir(char *out_dir, const char *in_dir, size_t size)
|
||||
path_parent_dir(out_dir);
|
||||
}
|
||||
|
||||
void fill_dated_filename(char *out_filename, const char *ext, size_t size)
|
||||
{
|
||||
time_t cur_time;
|
||||
time(&cur_time);
|
||||
|
||||
strftime(out_filename, size, "RetroArch-%m%d-%H%M%S.", localtime(&cur_time));
|
||||
strlcat(out_filename, ext, size);
|
||||
}
|
||||
|
||||
void path_basedir(char *path)
|
||||
{
|
||||
if (strlen(path) < 2)
|
||||
|
@ -111,8 +111,8 @@ enum
|
||||
};
|
||||
|
||||
/*============================================================
|
||||
EVENT CALLBACKS (AND RELATED)
|
||||
============================================================ */
|
||||
EVENT CALLBACKS (AND RELATED)
|
||||
============================================================ */
|
||||
|
||||
static void populate_setting_item(void *data, unsigned input)
|
||||
{
|
||||
@ -136,7 +136,7 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
}
|
||||
break;
|
||||
case SETTING_PAL60_MODE:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "PAL60 Mode");
|
||||
snprintf(current_item->text, sizeof(current_item->text), "PAL60 Mode");
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE)) ? "ON" : "OFF");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE)) ? "INFO - [PAL60 Mode] is set to 'ON'.\nconverts frames from 60Hz to 50Hz." : "INFO - [PAL60 Mode is set to 'OFF'.\nframes are not converted.");
|
||||
break;
|
||||
@ -167,6 +167,20 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%s", fname);
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Select a skin for the menu.");
|
||||
break;
|
||||
case SETTING_EMU_LOW_RAM_MODE_ENABLE:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "Low RAM Mode");
|
||||
if (g_extern.lifecycle_mode_state & (1ULL <<MODE_MENU_LOW_RAM_MODE_ENABLE) ||
|
||||
g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING))
|
||||
{
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "ON");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Will load skin at startup.");
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "OFF");
|
||||
snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Will not load skin at startup to save up on RAM.");
|
||||
}
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
snprintf(current_item->text, sizeof(current_item->text), "Font Size");
|
||||
snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%f", g_settings.video.font_size);
|
||||
@ -982,7 +996,7 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
(void)data;
|
||||
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
|
||||
filebrowser_t *filebrowser = tmpBrowser;
|
||||
|
||||
|
||||
switch(switchvalue)
|
||||
{
|
||||
#ifdef __CELLOS_LV2__
|
||||
@ -1033,7 +1047,7 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_PAL_ENABLE))
|
||||
{
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_TEMPORAL_ENABLE);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_VIDEO_PAL_VSYNC_BLOCK);
|
||||
driver.video->restart();
|
||||
}
|
||||
}
|
||||
@ -1108,6 +1122,35 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case SETTING_EMU_LOW_RAM_MODE_ENABLE:
|
||||
if((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B)))
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING)))
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE))
|
||||
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE);
|
||||
else
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW))
|
||||
rmenu_settings_msg(S_MSG_RESTART_RARCH, S_DELAY_180);
|
||||
}
|
||||
}
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_START))
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE)))
|
||||
{
|
||||
if (!(g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING)))
|
||||
{
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE);
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW))
|
||||
rmenu_settings_msg(S_MSG_RESTART_RARCH, S_DELAY_180);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SETTING_FONT_SIZE:
|
||||
if(input & (1ULL << RMENU_DEVICE_NAV_LEFT))
|
||||
{
|
||||
@ -1464,7 +1507,7 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
g_settings.audio.resampler, g_extern.audio_data.orig_src_ratio == 0.0 ? 1.0 : g_extern.audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler);
|
||||
g_extern.audio_active = false;
|
||||
@ -1479,11 +1522,11 @@ static int set_setting_action(void *data, unsigned switchvalue, uint64_t input)
|
||||
#else
|
||||
snprintf(g_settings.audio.resampler, sizeof(g_settings.audio.resampler), "hermite");
|
||||
#endif
|
||||
|
||||
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
g_settings.audio.resampler, g_extern.audio_data.orig_src_ratio == 0.0 ? 1.0 : g_extern.audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler);
|
||||
g_extern.audio_active = false;
|
||||
@ -2121,7 +2164,7 @@ int ingame_menu_screenshot(void *data, void *state)
|
||||
rmenu_state_t *rstate = (rmenu_state_t*)state;
|
||||
|
||||
uint64_t input = rstate->input;
|
||||
|
||||
|
||||
DEVICE_CAST device_ptr = (DEVICE_CAST)driver.video_data;
|
||||
filebrowser_t *filebrowser = NULL;
|
||||
|
||||
@ -2415,8 +2458,8 @@ int ingame_menu(void *data, void *state)
|
||||
}
|
||||
|
||||
/*============================================================
|
||||
INPUT POLL CALLBACK
|
||||
============================================================ */
|
||||
INPUT POLL CALLBACK
|
||||
============================================================ */
|
||||
|
||||
void rmenu_input_poll(void *data, void *state)
|
||||
{
|
||||
@ -2471,8 +2514,8 @@ void rmenu_input_poll(void *data, void *state)
|
||||
}
|
||||
|
||||
/*============================================================
|
||||
INPUT PROCESS CALLBACK
|
||||
============================================================ */
|
||||
INPUT PROCESS CALLBACK
|
||||
============================================================ */
|
||||
|
||||
int rmenu_input_process(void *data, void *state)
|
||||
{
|
||||
@ -2519,8 +2562,8 @@ int rmenu_input_process(void *data, void *state)
|
||||
}
|
||||
|
||||
/*============================================================
|
||||
RESOURCE CALLBACKS
|
||||
============================================================ */
|
||||
RESOURCE CALLBACKS
|
||||
============================================================ */
|
||||
|
||||
void init_filebrowser(void *data)
|
||||
{
|
||||
@ -2543,8 +2586,8 @@ void free_filebrowser(void *data)
|
||||
}
|
||||
|
||||
/*============================================================
|
||||
RMENU API
|
||||
============================================================ */
|
||||
RMENU API
|
||||
============================================================ */
|
||||
|
||||
|
||||
void menu_init(void)
|
||||
@ -2597,10 +2640,23 @@ bool rmenu_iterate(void)
|
||||
rmenu_default_positions_t default_pos;
|
||||
device_ptr->ctx_driver->rmenu_set_default_pos(&default_pos);
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
|
||||
device_ptr->ctx_driver->set_blend(true);
|
||||
if ((g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE)))
|
||||
{
|
||||
#if defined(HAVE_OPENGL)
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
#elif defined(HAVE_D3D8) || defined(HAVE_D3D9)
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->d3d_render_device;
|
||||
d3dr->Clear(0, NULL, D3DCLEAR_TARGET, 0xff000000, 1.0f, 0);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
|
||||
device_ptr->ctx_driver->set_blend(true);
|
||||
|
||||
rarch_render_cached_frame();
|
||||
rarch_render_cached_frame();
|
||||
}
|
||||
|
||||
if(current_menu.input_poll)
|
||||
rmenu_input_poll(¤t_menu, &rmenu_state);
|
||||
|
@ -140,6 +140,7 @@ enum
|
||||
SETTING_EMU_CURRENT_SAVE_STATE_SLOT,
|
||||
SETTING_EMU_SHOW_DEBUG_INFO_MSG,
|
||||
SETTING_EMU_SHOW_INFO_MSG,
|
||||
SETTING_EMU_LOW_RAM_MODE_ENABLE,
|
||||
SETTING_EMU_SKIN,
|
||||
SETTING_RARCH_DEFAULT_EMU,
|
||||
SETTING_QUIT_RARCH,
|
||||
|
@ -480,7 +480,7 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
g_settings.audio.resampler, g_extern.audio_data.orig_src_ratio == 0.0 ? 1.0 : g_extern.audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler);
|
||||
g_extern.audio_active = false;
|
||||
@ -609,7 +609,7 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
g_settings.audio.resampler, g_extern.audio_data.orig_src_ratio == 0.0 ? 1.0 : g_extern.audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler);
|
||||
g_extern.audio_active = false;
|
||||
@ -682,7 +682,7 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro
|
||||
if (g_extern.main_is_init)
|
||||
{
|
||||
if (!rarch_resampler_realloc(&g_extern.audio_data.resampler_data, &g_extern.audio_data.resampler,
|
||||
g_settings.audio.resampler))
|
||||
g_settings.audio.resampler, g_extern.audio_data.orig_src_ratio == 0.0 ? 1.0 : g_extern.audio_data.orig_src_ratio))
|
||||
{
|
||||
RARCH_ERR("Failed to initialize resampler \"%s\".\n", g_settings.audio.resampler);
|
||||
g_extern.audio_active = false;
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(HW_RVL)
|
||||
#include <string.h>
|
||||
#include <fat.h>
|
||||
#include <gctypes.h>
|
||||
@ -35,13 +34,8 @@ extern uint8_t _binary_wii_app_booter_app_booter_bin_end[];
|
||||
#define booter_start _binary_wii_app_booter_app_booter_bin_start
|
||||
#define booter_end _binary_wii_app_booter_app_booter_bin_end
|
||||
|
||||
#elif defined(HW_DOL)
|
||||
#include "../../ngc/sidestep.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch_logger.h"
|
||||
|
||||
#ifdef HW_RVL
|
||||
// NOTE: this does not update the path to point to the new loading .dol file.
|
||||
// we only need it for keeping the current directory anyway.
|
||||
void dol_copy_argv_path(void)
|
||||
@ -58,14 +52,13 @@ void dol_copy_argv_path(void)
|
||||
argv->length = len;
|
||||
DCFlushRange(ARGS_ADDR, sizeof(struct __argv) + argv->length);
|
||||
}
|
||||
#endif
|
||||
|
||||
// WARNING: after we move any data into EXECUTE_ADDR, we can no longer use any
|
||||
// heap memory and are restricted to the stack only
|
||||
static void rarch_console_exec(const char *path)
|
||||
{
|
||||
RARCH_LOG("Attempt to load executable: [%s].\n", path);
|
||||
#if defined(HW_RVL)
|
||||
|
||||
FILE * fp = fopen(path, "rb");
|
||||
if (fp == NULL)
|
||||
{
|
||||
@ -109,7 +102,4 @@ static void rarch_console_exec(const char *path)
|
||||
RARCH_LOG("jumping to %08x\n", (unsigned) BOOTER_ADDR);
|
||||
SYS_ResetSystem(SYS_SHUTDOWN,0,0);
|
||||
__lwp_thread_stopmultitasking((void (*)(void)) BOOTER_ADDR);
|
||||
#elif defined(HW_DOL)
|
||||
DOLtoARAM(path);
|
||||
#endif
|
||||
}
|
||||
|
@ -125,6 +125,8 @@ enum menu_enums
|
||||
MODE_MENU_INGAME,
|
||||
MODE_MENU_INGAME_EXIT,
|
||||
MODE_MENU_DRAW,
|
||||
MODE_MENU_LOW_RAM_MODE_ENABLE,
|
||||
MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING,
|
||||
MODE_INFO_DRAW,
|
||||
MODE_FPS_DRAW,
|
||||
MODE_EXTLAUNCH_SALAMANDER,
|
||||
@ -173,6 +175,7 @@ struct settings
|
||||
char filter_path[PATH_MAX];
|
||||
enum rarch_shader_type shader_type;
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
bool render_to_texture;
|
||||
|
||||
@ -396,7 +399,7 @@ struct global
|
||||
bool use_float;
|
||||
bool mute;
|
||||
|
||||
sample_t *outsamples;
|
||||
float *outsamples;
|
||||
int16_t *conv_outsamples;
|
||||
|
||||
int16_t *rewind_buf;
|
||||
|
@ -15,10 +15,12 @@
|
||||
*/
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../general.h"
|
||||
#include "../gfx_common.h"
|
||||
#include "../gl_common.h"
|
||||
|
||||
#include <EGL/egl.h> /* Requires NDK r5 or newer */
|
||||
#include <android/looper.h>
|
||||
|
||||
#include "../../frontend/frontend_android.h"
|
||||
#include "../image.h"
|
||||
@ -148,6 +150,10 @@ static bool gfx_ctx_init(void)
|
||||
goto error;
|
||||
}
|
||||
|
||||
ALooper *looper = ALooper_forThread();
|
||||
if (!looper)
|
||||
ALooper_prepare(ALOOPER_PREPARE_ALLOW_NON_CALLBACKS);
|
||||
|
||||
return true;
|
||||
|
||||
error:
|
||||
|
@ -329,6 +329,9 @@ void texture_image_border_load(const char *path)
|
||||
|
||||
static bool gfx_ctx_rmenu_init(void)
|
||||
{
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE))
|
||||
return true;
|
||||
|
||||
texture_image_border_load(g_extern.console.menu_texture_path);
|
||||
|
||||
return true;
|
||||
@ -478,21 +481,23 @@ static void gfx_ctx_set_filtering(unsigned index, bool set_smooth)
|
||||
if (!gl)
|
||||
return;
|
||||
|
||||
GLuint filter = set_smooth ? GL_LINEAR : GL_NEAREST;
|
||||
if (index == 1)
|
||||
{
|
||||
gl->tex_filter = filter;
|
||||
// Apply to all PREV textures.
|
||||
for (unsigned i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, set_smooth ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, set_smooth ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
||||
}
|
||||
}
|
||||
else if (index >= 2 && gl->fbo_inited)
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[index - 2]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, set_smooth ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, set_smooth ? GL_LINEAR : GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
@ -154,7 +154,9 @@ static bool gfx_ctx_xdk_menu_init(void)
|
||||
m_menuMainRomListPos_y = 130;
|
||||
}
|
||||
|
||||
texture_image_load(g_extern.console.menu_texture_path, &g_extern.console.menu_texture);
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE)) { }
|
||||
else
|
||||
texture_image_load(g_extern.console.menu_texture_path, &g_extern.console.menu_texture);
|
||||
|
||||
// Load rom selector panel
|
||||
texture_image_load("D:\\Media\\menuMainRomSelectPanel.png", &g_extern.console.menu_panel);
|
||||
@ -252,7 +254,7 @@ static void gfx_ctx_xdk_menu_screenshot_dump(void *data)
|
||||
char filename[PATH_MAX];
|
||||
char shotname[PATH_MAX];
|
||||
|
||||
screenshot_generate_filename(shotname, sizeof(shotname));
|
||||
fill_dated_filename(shotname, "bmp", sizeof(shotname));
|
||||
snprintf(filename, sizeof(filename), "%s\\%s", default_paths.screenshots_dir, shotname);
|
||||
|
||||
#if defined(_XBOX1)
|
||||
|
@ -312,7 +312,13 @@ end:
|
||||
void D3DVideo::calculate_rect(unsigned width, unsigned height,
|
||||
bool keep, float desired_aspect)
|
||||
{
|
||||
if (!keep)
|
||||
if (g_settings.video.scale_integer)
|
||||
{
|
||||
struct rarch_viewport vp = {0};
|
||||
gfx_scale_integer(&vp, width, height, desired_aspect, keep);
|
||||
set_viewport(vp.x, vp.y, vp.width, vp.height);
|
||||
}
|
||||
else if (!keep)
|
||||
set_viewport(0, 0, width, height);
|
||||
else
|
||||
{
|
||||
@ -1160,9 +1166,12 @@ static void *d3d9_init(const video_info_t *info, const input_driver_t **input,
|
||||
if (!vid)
|
||||
return nullptr;
|
||||
|
||||
void *dinput = input_dinput.init();
|
||||
*input = dinput ? &input_dinput : nullptr;
|
||||
*input_data = dinput;
|
||||
if (input && input_data)
|
||||
{
|
||||
void *dinput = input_dinput.init();
|
||||
*input = dinput ? &input_dinput : nullptr;
|
||||
*input_data = dinput;
|
||||
}
|
||||
|
||||
return vid;
|
||||
}
|
||||
|
29
gfx/gl.c
29
gfx/gl.c
@ -561,10 +561,36 @@ void gl_deinit_fbo(void *data)
|
||||
}
|
||||
}
|
||||
|
||||
static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
{
|
||||
bool smooth = false;
|
||||
if (!gl_shader_filter_type(gl, 1, &smooth))
|
||||
return;
|
||||
|
||||
GLuint new_filt = smooth ? GL_LINEAR : GL_NEAREST;
|
||||
if (new_filt == gl->tex_filter)
|
||||
return;
|
||||
|
||||
gl->tex_filter = new_filt;
|
||||
for (unsigned i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
if (gl->texture[i])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl->tex_filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl->tex_filter);
|
||||
}
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
}
|
||||
|
||||
void gl_init_fbo(void *data, unsigned width, unsigned height)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
|
||||
gl_update_tex_filter_frame(gl);
|
||||
|
||||
// No need to use FBOs.
|
||||
#ifndef RARCH_CONSOLE
|
||||
/* we always want FBO to be at least initialized on startup for consoles */
|
||||
@ -1701,7 +1727,8 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
gl_init_textures(gl, video);
|
||||
gl_init_textures_data(gl);
|
||||
|
||||
context_input_driver_func(input, input_data);
|
||||
if (input && input_data)
|
||||
context_input_driver_func(input, input_data);
|
||||
|
||||
#ifndef HAVE_RMENU
|
||||
// Comes too early for console - moved to gl_start
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
#include "rpng.h"
|
||||
|
||||
#ifdef WANT_RZLIB
|
||||
#include "../../deps/rzlib/zlib.h"
|
||||
#ifdef WANT_MINIZ
|
||||
#include "../../deps/miniz/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
@ -231,16 +231,19 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
|
||||
|
||||
sdl_gfx_set_handles();
|
||||
|
||||
sdl_input = input_sdl.init();
|
||||
if (sdl_input)
|
||||
if (input && input_data)
|
||||
{
|
||||
*input = &input_sdl;
|
||||
*input_data = sdl_input;
|
||||
}
|
||||
else
|
||||
{
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
sdl_input = input_sdl.init();
|
||||
if (sdl_input)
|
||||
{
|
||||
*input = &input_sdl;
|
||||
*input_data = sdl_input;
|
||||
}
|
||||
else
|
||||
{
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
sdl_init_font(vid, g_settings.video.font_path, g_settings.video.font_size);
|
||||
|
@ -1025,11 +1025,11 @@ static bool load_preset(const char *path)
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
g_settings.video.smooth = fbo_smooth[1];
|
||||
g_settings.video.smooth = fbo_smooth[1] == FILTER_LINEAR;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
g_settings.video.second_pass_smooth = fbo_smooth[2];
|
||||
g_settings.video.second_pass_smooth = fbo_smooth[2] == FILTER_LINEAR;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
587
gfx/thread_wrapper.c
Normal file
587
gfx/thread_wrapper.c
Normal file
@ -0,0 +1,587 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "thread_wrapper.h"
|
||||
#include "../thread.h"
|
||||
#include "../general.h"
|
||||
#include "../performance.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
|
||||
enum thread_cmd
|
||||
{
|
||||
CMD_NONE = 0,
|
||||
CMD_INIT,
|
||||
CMD_SET_SHADER,
|
||||
CMD_FREE,
|
||||
CMD_ALIVE, // Blocking alive check. Used when paused.
|
||||
CMD_SET_ROTATION,
|
||||
CMD_READ_VIEWPORT,
|
||||
CMD_SET_NONBLOCK,
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
CMD_OVERLAY_ENABLE,
|
||||
CMD_OVERLAY_LOAD,
|
||||
CMD_OVERLAY_TEX_GEOM,
|
||||
CMD_OVERLAY_VERTEX_GEOM,
|
||||
CMD_OVERLAY_FULL_SCREEN,
|
||||
CMD_OVERLAY_SET_ALPHA,
|
||||
#endif
|
||||
|
||||
CMD_DUMMY = INT_MAX
|
||||
};
|
||||
|
||||
typedef struct thread_video
|
||||
{
|
||||
slock_t *lock;
|
||||
scond_t *cond_cmd;
|
||||
scond_t *cond_thread;
|
||||
sthread_t *thread;
|
||||
|
||||
video_info_t info;
|
||||
const video_driver_t *driver;
|
||||
#ifdef HAVE_OVERLAY
|
||||
const video_overlay_interface_t *overlay;
|
||||
#endif
|
||||
void *driver_data;
|
||||
const input_driver_t **input;
|
||||
void **input_data;
|
||||
|
||||
bool alive;
|
||||
bool focus;
|
||||
|
||||
enum thread_cmd send_cmd;
|
||||
enum thread_cmd reply_cmd;
|
||||
union
|
||||
{
|
||||
bool b;
|
||||
int i;
|
||||
float f;
|
||||
const char *str;
|
||||
void *v;
|
||||
|
||||
struct
|
||||
{
|
||||
enum rarch_shader_type type;
|
||||
const char *path;
|
||||
unsigned index;
|
||||
} set_shader;
|
||||
|
||||
struct
|
||||
{
|
||||
float x, y, w, h;
|
||||
} rect;
|
||||
|
||||
struct
|
||||
{
|
||||
const uint32_t *data;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
} image;
|
||||
} cmd_data;
|
||||
|
||||
struct rarch_viewport vp;
|
||||
struct rarch_viewport read_vp; // Last viewport reported to caller.
|
||||
|
||||
struct
|
||||
{
|
||||
slock_t *lock;
|
||||
uint8_t *buffer;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned pitch;
|
||||
bool updated;
|
||||
char msg[1024];
|
||||
} frame;
|
||||
|
||||
video_driver_t video_thread;
|
||||
|
||||
} thread_video_t;
|
||||
|
||||
static void *thread_init_never_call(const video_info_t *video, const input_driver_t **input, void **input_data)
|
||||
{
|
||||
(void)video;
|
||||
(void)input;
|
||||
(void)input_data;
|
||||
RARCH_ERR("Sanity check fail! Threaded mustn't be reinit.\n");
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void thread_reply(thread_video_t *thr, enum thread_cmd cmd)
|
||||
{
|
||||
slock_lock(thr->lock);
|
||||
thr->reply_cmd = cmd;
|
||||
thr->send_cmd = CMD_NONE;
|
||||
scond_signal(thr->cond_cmd);
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static void thread_loop(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
bool updated = false;
|
||||
slock_lock(thr->lock);
|
||||
while (thr->send_cmd == CMD_NONE && !thr->frame.updated)
|
||||
scond_wait(thr->cond_thread, thr->lock);
|
||||
if (thr->frame.updated)
|
||||
updated = true;
|
||||
slock_unlock(thr->lock);
|
||||
|
||||
switch (thr->send_cmd)
|
||||
{
|
||||
case CMD_INIT:
|
||||
thr->driver_data = thr->driver->init(&thr->info, thr->input, thr->input_data);
|
||||
thr->cmd_data.b = thr->driver_data;
|
||||
thr->driver->viewport_info(thr->driver_data, &thr->vp);
|
||||
thread_reply(thr, CMD_INIT);
|
||||
break;
|
||||
|
||||
case CMD_FREE:
|
||||
if (thr->driver_data)
|
||||
thr->driver->free(thr->driver_data);
|
||||
thr->driver_data = NULL;
|
||||
thread_reply(thr, CMD_FREE);
|
||||
return;
|
||||
|
||||
case CMD_SET_NONBLOCK:
|
||||
thr->driver->set_nonblock_state(thr->driver_data, thr->cmd_data.b);
|
||||
thread_reply(thr, CMD_SET_NONBLOCK);
|
||||
break;
|
||||
|
||||
case CMD_SET_ROTATION:
|
||||
thr->driver->set_rotation(thr->driver_data, thr->cmd_data.i);
|
||||
thread_reply(thr, CMD_SET_ROTATION);
|
||||
break;
|
||||
|
||||
case CMD_READ_VIEWPORT:
|
||||
{
|
||||
struct rarch_viewport vp = {0};
|
||||
thr->driver->viewport_info(thr->driver_data, &vp);
|
||||
if (memcmp(&vp, &thr->read_vp, sizeof(vp)) == 0) // We can read safely
|
||||
{
|
||||
thr->cmd_data.b = thr->driver->read_viewport(thr->driver_data, (uint8_t*)thr->cmd_data.v);
|
||||
thread_reply(thr, CMD_READ_VIEWPORT);
|
||||
}
|
||||
else // Viewport dimensions changed right after main thread read the async value. Cannot read safely.
|
||||
{
|
||||
thr->cmd_data.b = false;
|
||||
thread_reply(thr, CMD_READ_VIEWPORT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case CMD_SET_SHADER:
|
||||
{
|
||||
bool ret = thr->driver->set_shader(thr->driver_data,
|
||||
thr->cmd_data.set_shader.type,
|
||||
thr->cmd_data.set_shader.path,
|
||||
thr->cmd_data.set_shader.index);
|
||||
thr->cmd_data.b = ret;
|
||||
thread_reply(thr, CMD_SET_SHADER);
|
||||
break;
|
||||
}
|
||||
|
||||
case CMD_ALIVE:
|
||||
thr->cmd_data.b = thr->driver->alive(thr->driver_data);
|
||||
thread_reply(thr, CMD_ALIVE);
|
||||
break;
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
case CMD_OVERLAY_ENABLE:
|
||||
thr->overlay->enable(thr->driver_data, thr->cmd_data.b);
|
||||
thread_reply(thr, CMD_OVERLAY_ENABLE);
|
||||
break;
|
||||
|
||||
case CMD_OVERLAY_LOAD:
|
||||
thr->cmd_data.b = thr->overlay->load(thr->driver_data,
|
||||
thr->cmd_data.image.data,
|
||||
thr->cmd_data.image.width,
|
||||
thr->cmd_data.image.height);
|
||||
thread_reply(thr, CMD_OVERLAY_LOAD);
|
||||
break;
|
||||
|
||||
case CMD_OVERLAY_TEX_GEOM:
|
||||
thr->overlay->tex_geom(thr->driver_data,
|
||||
thr->cmd_data.rect.x,
|
||||
thr->cmd_data.rect.y,
|
||||
thr->cmd_data.rect.w,
|
||||
thr->cmd_data.rect.h);
|
||||
thread_reply(thr, CMD_OVERLAY_TEX_GEOM);
|
||||
break;
|
||||
|
||||
case CMD_OVERLAY_VERTEX_GEOM:
|
||||
thr->overlay->vertex_geom(thr->driver_data,
|
||||
thr->cmd_data.rect.x,
|
||||
thr->cmd_data.rect.y,
|
||||
thr->cmd_data.rect.w,
|
||||
thr->cmd_data.rect.h);
|
||||
thread_reply(thr, CMD_OVERLAY_VERTEX_GEOM);
|
||||
break;
|
||||
|
||||
case CMD_OVERLAY_FULL_SCREEN:
|
||||
thr->overlay->full_screen(thr->driver_data, thr->cmd_data.b);
|
||||
thread_reply(thr, CMD_OVERLAY_FULL_SCREEN);
|
||||
break;
|
||||
|
||||
case CMD_OVERLAY_SET_ALPHA:
|
||||
thr->overlay->set_alpha(thr->driver_data, thr->cmd_data.f);
|
||||
thread_reply(thr, CMD_OVERLAY_SET_ALPHA);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
thread_reply(thr, thr->send_cmd);
|
||||
break;
|
||||
}
|
||||
|
||||
if (updated)
|
||||
{
|
||||
slock_lock(thr->frame.lock);
|
||||
bool ret = thr->driver->frame(thr->driver_data,
|
||||
thr->frame.buffer, thr->frame.width, thr->frame.height,
|
||||
thr->frame.pitch, *thr->frame.msg ? thr->frame.msg : NULL);
|
||||
slock_unlock(thr->frame.lock);
|
||||
|
||||
bool alive = ret && thr->driver->alive(thr->driver_data);
|
||||
bool focus = ret && thr->driver->focus(thr->driver_data);
|
||||
|
||||
struct rarch_viewport vp = {0};
|
||||
thr->driver->viewport_info(thr->driver_data, &vp);
|
||||
|
||||
slock_lock(thr->lock);
|
||||
thr->alive = alive;
|
||||
thr->focus = focus;
|
||||
thr->frame.updated = false;
|
||||
thr->vp = vp;
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void thread_send_cmd(thread_video_t *thr, enum thread_cmd cmd)
|
||||
{
|
||||
slock_lock(thr->lock);
|
||||
thr->send_cmd = cmd;
|
||||
thr->reply_cmd = CMD_NONE;
|
||||
scond_signal(thr->cond_thread);
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static void thread_wait_reply(thread_video_t *thr, enum thread_cmd cmd)
|
||||
{
|
||||
slock_lock(thr->lock);
|
||||
while (cmd != thr->reply_cmd)
|
||||
scond_wait(thr->cond_cmd, thr->lock);
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static bool thread_alive(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
if (g_extern.is_paused)
|
||||
{
|
||||
thread_send_cmd(thr, CMD_ALIVE);
|
||||
thread_wait_reply(thr, CMD_ALIVE);
|
||||
return thr->cmd_data.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
slock_lock(thr->lock);
|
||||
bool ret = thr->alive;
|
||||
slock_unlock(thr->lock);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
static bool thread_focus(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
slock_lock(thr->lock);
|
||||
bool ret = thr->focus;
|
||||
slock_unlock(thr->lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static bool thread_frame(void *data, const void *frame_,
|
||||
unsigned width, unsigned height, unsigned pitch, const char *msg)
|
||||
{
|
||||
if (!frame_)
|
||||
return true;
|
||||
|
||||
RARCH_PERFORMANCE_INIT(thread_frame);
|
||||
RARCH_PERFORMANCE_START(thread_frame);
|
||||
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
unsigned copy_stride = width * (thr->info.rgb32 ? sizeof(uint32_t) : sizeof(uint16_t));
|
||||
|
||||
const uint8_t *src = (const uint8_t*)frame_;
|
||||
uint8_t *dst = thr->frame.buffer;
|
||||
|
||||
slock_lock(thr->lock);
|
||||
// Drop frame if updated flag is still set, as thread is still working on last frame.
|
||||
if (!thr->frame.updated)
|
||||
{
|
||||
slock_lock(thr->frame.lock);
|
||||
for (unsigned h = 0; h < height; h++, src += pitch, dst += copy_stride)
|
||||
memcpy(dst, src, copy_stride);
|
||||
thr->frame.updated = true;
|
||||
thr->frame.width = width;
|
||||
thr->frame.height = height;
|
||||
thr->frame.pitch = copy_stride;
|
||||
|
||||
if (msg)
|
||||
strlcpy(thr->frame.msg, msg, sizeof(thr->frame.msg));
|
||||
else
|
||||
*thr->frame.msg = '\0';
|
||||
|
||||
scond_signal(thr->cond_thread);
|
||||
slock_unlock(thr->frame.lock);
|
||||
}
|
||||
slock_unlock(thr->lock);
|
||||
|
||||
RARCH_PERFORMANCE_STOP(thread_frame);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void thread_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.b = state;
|
||||
thread_send_cmd(thr, CMD_SET_NONBLOCK);
|
||||
thread_wait_reply(thr, CMD_SET_NONBLOCK);
|
||||
}
|
||||
|
||||
static bool thread_init(thread_video_t *thr, const video_info_t *info, const input_driver_t **input,
|
||||
void **input_data)
|
||||
{
|
||||
thr->lock = slock_new();
|
||||
thr->frame.lock = slock_new();
|
||||
thr->cond_cmd = scond_new();
|
||||
thr->cond_thread = scond_new();
|
||||
thr->input = input;
|
||||
thr->input_data = input_data;
|
||||
thr->info = *info;
|
||||
thr->alive = true;
|
||||
thr->focus = true;
|
||||
|
||||
size_t max_size = info->input_scale * RARCH_SCALE_BASE;
|
||||
max_size *= max_size;
|
||||
max_size *= info->rgb32 ? sizeof(uint32_t) : sizeof(uint16_t);
|
||||
thr->frame.buffer = (uint8_t*)malloc(max_size);
|
||||
if (!thr->frame.buffer)
|
||||
return false;
|
||||
|
||||
memset(thr->frame.buffer, 0x80, max_size);
|
||||
|
||||
thr->thread = sthread_create(thread_loop, thr);
|
||||
if (!thr->thread)
|
||||
return false;
|
||||
thread_send_cmd(thr, CMD_INIT);
|
||||
thread_wait_reply(thr, CMD_INIT);
|
||||
|
||||
return thr->cmd_data.b;
|
||||
}
|
||||
|
||||
static bool thread_set_shader(void *data, enum rarch_shader_type type, const char *path, unsigned index)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.set_shader.type = type;
|
||||
thr->cmd_data.set_shader.path = path;
|
||||
thr->cmd_data.set_shader.index = index;
|
||||
thread_send_cmd(thr, CMD_SET_SHADER);
|
||||
thread_wait_reply(thr, CMD_SET_SHADER);
|
||||
return thr->cmd_data.b;
|
||||
}
|
||||
|
||||
static void thread_set_rotation(void *data, unsigned rotation)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.i = rotation;
|
||||
thread_send_cmd(thr, CMD_SET_ROTATION);
|
||||
thread_wait_reply(thr, CMD_SET_ROTATION);
|
||||
}
|
||||
|
||||
// This value is set async as stalling on the video driver for every query is too slow.
|
||||
// This means this value might not be correct, so viewport reads are not supported for now.
|
||||
static void thread_viewport_info(void *data, struct rarch_viewport *vp)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
slock_lock(thr->lock);
|
||||
*vp = thr->vp;
|
||||
|
||||
// Explicitly mem-copied so we can use memcmp correctly later.
|
||||
memcpy(&thr->read_vp, &thr->vp, sizeof(thr->vp));
|
||||
slock_unlock(thr->lock);
|
||||
}
|
||||
|
||||
static bool thread_read_viewport(void *data, uint8_t *buffer)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.v = buffer;
|
||||
thread_send_cmd(thr, CMD_READ_VIEWPORT);
|
||||
thread_wait_reply(thr, CMD_READ_VIEWPORT);
|
||||
return thr->cmd_data.b;
|
||||
}
|
||||
|
||||
static void thread_free(void *data)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
if (!thr)
|
||||
return;
|
||||
|
||||
thread_send_cmd(thr, CMD_FREE);
|
||||
thread_wait_reply(thr, CMD_FREE);
|
||||
sthread_join(thr->thread);
|
||||
|
||||
free(thr->frame.buffer);
|
||||
slock_free(thr->frame.lock);
|
||||
slock_free(thr->lock);
|
||||
scond_free(thr->cond_cmd);
|
||||
scond_free(thr->cond_thread);
|
||||
|
||||
free(thr);
|
||||
}
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
static void thread_overlay_enable(void *data, bool state)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.b = state;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_ENABLE);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_ENABLE);
|
||||
}
|
||||
|
||||
static bool thread_overlay_load(void *data, const uint32_t *image, unsigned width, unsigned height)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.image.data = image;
|
||||
thr->cmd_data.image.width = width;
|
||||
thr->cmd_data.image.height = height;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_LOAD);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_LOAD);
|
||||
return thr->cmd_data.b;
|
||||
}
|
||||
|
||||
static void thread_overlay_tex_geom(void *data, float x, float y, float w, float h)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.rect.x = x;
|
||||
thr->cmd_data.rect.y = y;
|
||||
thr->cmd_data.rect.w = w;
|
||||
thr->cmd_data.rect.h = h;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_TEX_GEOM);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_TEX_GEOM);
|
||||
}
|
||||
|
||||
static void thread_overlay_vertex_geom(void *data, float x, float y, float w, float h)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.rect.x = x;
|
||||
thr->cmd_data.rect.y = y;
|
||||
thr->cmd_data.rect.w = w;
|
||||
thr->cmd_data.rect.h = h;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_VERTEX_GEOM);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_VERTEX_GEOM);
|
||||
}
|
||||
|
||||
static void thread_overlay_full_screen(void *data, bool enable)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.b = enable;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_FULL_SCREEN);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_FULL_SCREEN);
|
||||
}
|
||||
|
||||
static void thread_overlay_set_alpha(void *data, float mod)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
thr->cmd_data.f = mod;
|
||||
thread_send_cmd(thr, CMD_OVERLAY_SET_ALPHA);
|
||||
thread_wait_reply(thr, CMD_OVERLAY_SET_ALPHA);
|
||||
}
|
||||
|
||||
static const video_overlay_interface_t thread_overlay = {
|
||||
thread_overlay_enable,
|
||||
thread_overlay_load,
|
||||
thread_overlay_tex_geom,
|
||||
thread_overlay_vertex_geom,
|
||||
thread_overlay_full_screen,
|
||||
thread_overlay_set_alpha,
|
||||
};
|
||||
|
||||
static void thread_get_overlay_interface(void *data, const video_overlay_interface_t **iface)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
*iface = &thread_overlay;
|
||||
thr->driver->overlay_interface(thr->driver_data, &thr->overlay);
|
||||
}
|
||||
#endif
|
||||
|
||||
static const video_driver_t video_thread = {
|
||||
thread_init_never_call, // Should never be called directly.
|
||||
thread_frame,
|
||||
thread_set_nonblock_state,
|
||||
thread_alive,
|
||||
thread_focus,
|
||||
thread_set_shader,
|
||||
thread_free,
|
||||
"Thread wrapper",
|
||||
thread_set_rotation,
|
||||
thread_viewport_info,
|
||||
thread_read_viewport,
|
||||
#ifdef HAVE_OVERLAY
|
||||
thread_get_overlay_interface, // get_overlay_interface
|
||||
#endif
|
||||
};
|
||||
|
||||
static void thread_set_callbacks(thread_video_t *thr, const video_driver_t *driver)
|
||||
{
|
||||
thr->video_thread = video_thread;
|
||||
// Disable optional features if not present.
|
||||
if (!driver->read_viewport)
|
||||
thr->video_thread.read_viewport = NULL;
|
||||
if (!driver->set_rotation)
|
||||
thr->video_thread.set_rotation = NULL;
|
||||
if (!driver->set_shader)
|
||||
thr->video_thread.set_shader = NULL;
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (!driver->overlay_interface)
|
||||
thr->video_thread.overlay_interface = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool rarch_threaded_video_init(const video_driver_t **out_driver, void **out_data,
|
||||
const input_driver_t **input, void **input_data,
|
||||
const video_driver_t *driver, const video_info_t *info)
|
||||
{
|
||||
thread_video_t *thr = (thread_video_t*)calloc(1, sizeof(*thr));
|
||||
if (!thr)
|
||||
return false;
|
||||
|
||||
thread_set_callbacks(thr, driver);
|
||||
|
||||
thr->driver = driver;
|
||||
*out_driver = &thr->video_thread;
|
||||
*out_data = thr;
|
||||
return thread_init(thr, info, input, input_data);
|
||||
}
|
||||
|
||||
|
24
gfx/thread_wrapper.h
Normal file
24
gfx/thread_wrapper.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../driver.h"
|
||||
#include "../boolean.h"
|
||||
|
||||
// Starts a video driver in a new thread.
|
||||
// Access to video driver will be mediated through this driver.
|
||||
bool rarch_threaded_video_init(const video_driver_t **out_driver, void **out_data,
|
||||
const input_driver_t **input, void **input_data,
|
||||
const video_driver_t *driver, const video_info_t *info);
|
||||
|
15
gfx/xvideo.c
15
gfx/xvideo.c
@ -464,14 +464,17 @@ static void *xv_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
driver.video_display = (uintptr_t)xv->display;
|
||||
driver.video_window = (Window)xv->window;
|
||||
|
||||
xinput = input_x.init();
|
||||
if (xinput)
|
||||
if (input && input_data)
|
||||
{
|
||||
*input = &input_x;
|
||||
*input_data = xinput;
|
||||
xinput = input_x.init();
|
||||
if (xinput)
|
||||
{
|
||||
*input = &input_x;
|
||||
*input_data = xinput;
|
||||
}
|
||||
else
|
||||
*input = NULL;
|
||||
}
|
||||
else
|
||||
*input = NULL;
|
||||
|
||||
init_yuv_tables(xv);
|
||||
xv_init_font(xv, g_settings.video.font_path, g_settings.video.font_size);
|
||||
|
4
hash.h
4
hash.h
@ -28,8 +28,8 @@
|
||||
void sha256_hash(char *out, const uint8_t *in, size_t size);
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
#ifdef WANT_RZLIB
|
||||
#include "deps/rzlib/zlib.h"
|
||||
#ifdef WANT_MINIZ
|
||||
#include "deps/miniz/zlib.h"
|
||||
#else
|
||||
#include <zlib.h>
|
||||
#endif
|
||||
|
@ -66,6 +66,8 @@ struct input_overlay
|
||||
const video_overlay_interface_t *iface;
|
||||
bool enable;
|
||||
|
||||
bool blocked;
|
||||
|
||||
struct overlay *overlays;
|
||||
const struct overlay *active;
|
||||
size_t index;
|
||||
@ -123,15 +125,22 @@ static bool input_overlay_load_desc(config_file_t *conf, struct overlay_desc *de
|
||||
|
||||
char overlay[256];
|
||||
if (!config_get_array(conf, overlay_desc_key, overlay, sizeof(overlay)))
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Didn't find key: %s.\n", overlay_desc_key);
|
||||
return false;
|
||||
}
|
||||
|
||||
struct string_list *list = string_split(overlay, ", ");
|
||||
if (!list)
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to split overlay desc.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (list->size < 6)
|
||||
{
|
||||
string_list_free(list);
|
||||
RARCH_ERR("[Overlay]: Overlay desc is invalid. Requires at least 6 tokens.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -154,6 +163,7 @@ static bool input_overlay_load_desc(config_file_t *conf, struct overlay_desc *de
|
||||
desc->hitbox = OVERLAY_HITBOX_RECT;
|
||||
else
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Hitbox type (%s) is invalid. Use \"radial\" or \"rect\".\n", box);
|
||||
ret = false;
|
||||
goto end;
|
||||
}
|
||||
@ -176,7 +186,10 @@ static bool input_overlay_load_overlay(config_file_t *conf, const char *config_p
|
||||
|
||||
snprintf(overlay_path_key, sizeof(overlay_path_key), "overlay%u_overlay", index);
|
||||
if (!config_get_path(conf, overlay_path_key, overlay_path, sizeof(overlay_path)))
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Config key: %s is not set.\n", overlay_path_key);
|
||||
return false;
|
||||
}
|
||||
|
||||
fill_pathname_resolve_relative(overlay_resolved_path, config_path,
|
||||
overlay_path, sizeof(overlay_resolved_path));
|
||||
@ -203,7 +216,10 @@ static bool input_overlay_load_overlay(config_file_t *conf, const char *config_p
|
||||
{
|
||||
struct string_list *list = string_split(overlay_rect, ", ");
|
||||
if (list->size < 4)
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to split rect \"%s\" into at least four tokens.\n", overlay_rect);
|
||||
return false;
|
||||
}
|
||||
|
||||
overlay->x = strtod(list->elems[0].data, NULL);
|
||||
overlay->y = strtod(list->elems[1].data, NULL);
|
||||
@ -223,18 +239,27 @@ static bool input_overlay_load_overlay(config_file_t *conf, const char *config_p
|
||||
|
||||
unsigned descs = 0;
|
||||
if (!config_get_uint(conf, overlay_descs_key, &descs))
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to read number of descs from config key: %s.\n", overlay_descs_key);
|
||||
return false;
|
||||
}
|
||||
|
||||
overlay->descs = (struct overlay_desc*)calloc(descs, sizeof(*overlay->descs));
|
||||
if (!overlay->descs)
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to allocate descs.\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
overlay->size = descs;
|
||||
|
||||
for (size_t i = 0; i < overlay->size; i++)
|
||||
{
|
||||
if (!input_overlay_load_desc(conf, &overlay->descs[i], index, i, img.width, img.height))
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to load overlay descs for overlay #%u.\n", (unsigned)i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -284,6 +309,7 @@ static bool input_overlay_load_overlays(input_overlay_t *ol, const char *path)
|
||||
{
|
||||
if (!input_overlay_load_overlay(conf, path, &ol->overlays[i], i))
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to load overlay #%u.\n", (unsigned)i);
|
||||
ret = false;
|
||||
goto end;
|
||||
}
|
||||
@ -366,7 +392,10 @@ static bool inside_hitbox(const struct overlay_desc *desc, float x, float y)
|
||||
uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y)
|
||||
{
|
||||
if (!ol->enable)
|
||||
{
|
||||
ol->blocked = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// norm_x and norm_y is in [-0x7fff, 0x7fff] range, like RETRO_DEVICE_POINTER.
|
||||
float x = (float)(norm_x + 0x7fff) / 0xffff;
|
||||
@ -384,9 +413,19 @@ uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y)
|
||||
state |= ol->active->descs[i].key_mask;
|
||||
}
|
||||
|
||||
if (!state)
|
||||
ol->blocked = false;
|
||||
else if (ol->blocked)
|
||||
state = 0;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void input_overlay_poll_clear(input_overlay_t *ol)
|
||||
{
|
||||
ol->blocked = false;
|
||||
}
|
||||
|
||||
void input_overlay_next(input_overlay_t *ol)
|
||||
{
|
||||
ol->index = (ol->index + 1) % ol->size;
|
||||
@ -396,6 +435,7 @@ void input_overlay_next(input_overlay_t *ol)
|
||||
ol->iface->vertex_geom(ol->iface_data,
|
||||
ol->active->mod_x, ol->active->mod_y, ol->active->mod_w, ol->active->mod_h);
|
||||
ol->iface->full_screen(ol->iface_data, ol->active->full_screen);
|
||||
ol->blocked = true;
|
||||
}
|
||||
|
||||
bool input_overlay_full_screen(input_overlay_t *ol)
|
||||
|
@ -37,6 +37,9 @@ bool input_overlay_full_screen(input_overlay_t *ol);
|
||||
// Resulting state is a bitmask of (1 << key_bind_id).
|
||||
uint64_t input_overlay_poll(input_overlay_t *ol, int16_t norm_x, int16_t norm_y);
|
||||
|
||||
// Call when there is nothing to poll. Allows overlay to clear certain state.
|
||||
void input_overlay_poll_clear(input_overlay_t *ol);
|
||||
|
||||
// Sets a modulating factor for alpha channel. Default is 1.0.
|
||||
// The alpha factor is applied for all overlays.
|
||||
void input_overlay_set_alpha_mod(input_overlay_t *ol, float mod);
|
||||
|
@ -314,7 +314,7 @@ enum retro_key
|
||||
|
||||
RETROK_LAST,
|
||||
|
||||
RETROK_DUMMY = INT_MAX, // Ensure sizeof(enum) == sizeof(int)
|
||||
RETROK_DUMMY = INT_MAX // Ensure sizeof(enum) == sizeof(int)
|
||||
};
|
||||
|
||||
enum retro_mod
|
||||
@ -330,7 +330,7 @@ enum retro_mod
|
||||
RETROKMOD_CAPSLOCK = 0x20,
|
||||
RETROKMOD_SCROLLOCK = 0x40,
|
||||
|
||||
RETROKMOD_DUMMY = INT_MAX, // Ensure sizeof(enum) == sizeof(int)
|
||||
RETROKMOD_DUMMY = INT_MAX // Ensure sizeof(enum) == sizeof(int)
|
||||
};
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -113,7 +113,7 @@
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -136,7 +136,7 @@
|
||||
<PREfast>AnalyzeOnly</PREfast>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -160,7 +160,7 @@
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -189,7 +189,7 @@
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -215,7 +215,7 @@
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -241,7 +241,7 @@
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE=1;_XBOX360;IS_SALAMANDER;HAVE_RARCH_EXEC</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -113,7 +113,7 @@
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";%(PreprocessorDefinitions);HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;RARCH_CONSOLE;HAVE_RMENU;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -151,7 +151,7 @@
|
||||
<PREfast>AnalyzeOnly</PREfast>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;HAVE_FILEBROWSER;RARCH_CONSOLE;HAVE_RMENU;HAVE_ZLIB;HAVE_RARCH_MAIN_WRAP;HAVE_RARCH_EXEC;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN;HAVE_HLSL;HAVE_VID_CONTEXT;HAVE_D3D9;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -190,7 +190,7 @@
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@ -234,7 +234,7 @@
|
||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";HAVE_DEFAULT_RETROPAD_INPUT;_CRT_SECURE_NO_WARNINGS;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -275,7 +275,7 @@
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;main=rarch_main;RARCH_CONSOLE=1;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_RMENU;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@ -316,7 +316,7 @@
|
||||
<ExceptionHandling>false</ExceptionHandling>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);HAVE_XINPUT2;PACKAGE_VERSION="0.9.8.4";_CRT_SECURE_NO_WARNINGS;HAVE_DEFAULT_RETROPAD_INPUT;RARCH_CONSOLE;HAVE_RMENU;main=rarch_main;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;_XBOX360;HAVE_FBO;HAVE_SCREENSHOTS;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY;HAVE_XAUDIO</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
|
@ -21,7 +21,7 @@
|
||||
Optimization="0"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;IS_SALAMANDER;RARCH_CONSOLE"
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;IS_SALAMANDER;RARCH_CONSOLE;HAVE_RARCH_EXEC"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
@ -69,7 +69,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;IS_SALAMANDER;RARCH_CONSOLE"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;IS_SALAMANDER;RARCH_CONSOLE;HAVE_RARCH_EXEC"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -121,7 +121,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;FASTCAP;IS_SALAMANDER;RARCH_CONSOLE"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;PROFILE;FASTCAP;IS_SALAMANDER;RARCH_CONSOLE;HAVE_RARCH_EXEC"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -174,7 +174,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;IS_SALAMANDER;RARCH_CONSOLE"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;IS_SALAMANDER;RARCH_CONSOLE;HAVE_RARCH_EXEC"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -226,7 +226,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;LTCG;IS_SALAMANDER;RARCH_CONSOLE"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;LTCG;IS_SALAMANDER;RARCH_CONSOLE;HAVE_RARCH_EXEC"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
|
@ -22,7 +22,7 @@
|
||||
Optimization="3"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
PreprocessorDefinitions="_DEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
@ -35,7 +35,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib dmusicd.lib xactengd.lib xsndtrkd.lib xvoiced.lib xonlined.lib xboxkrnl.lib xbdm.lib $(TargetDir)libretro_xdk.lib"
|
||||
AdditionalDependencies="xapilibd.lib d3d8d.lib d3dx8d.lib xgraphicsd.lib dsoundd.lib xonlined.lib xboxkrnl.lib xbdm.lib $(TargetDir)libretro_xdk.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"
|
||||
@ -56,7 +56,7 @@
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
StackSize="262144"
|
||||
StackSize="65536"
|
||||
IncludeDebugInfo="TRUE"
|
||||
NoLibWarn="TRUE"/>
|
||||
</Configuration>
|
||||
@ -72,7 +72,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -86,7 +86,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xapilib.lib d3d8i.lib d3dx8.lib xgraphics.lib dsound.lib dmusici.lib xactengi.lib xsndtrk.lib xvoice.lib xonlines.lib xboxkrnl.lib xbdm.lib xperf.lib $(TargetDir)libretro_xdk.lib"
|
||||
AdditionalDependencies="xapilib.lib d3d8i.lib d3dx8.lib xgraphics.lib dsound.lib xonlines.lib xboxkrnl.lib xbdm.lib xperf.lib $(TargetDir)libretro_xdk.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
@ -110,7 +110,7 @@
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
StackSize="262144"
|
||||
StackSize="65536"
|
||||
IncludeDebugInfo="TRUE"
|
||||
LimitAvailableMemoryTo64MB="FALSE"
|
||||
NoLibWarn="TRUE"/>
|
||||
@ -127,7 +127,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;PROFILE;FASTCAP;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -142,7 +142,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xapilib.lib d3d8i.lib d3dx8.lib xgraphics.lib dsound.lib dmusici.lib xactengi.lib xsndtrk.lib xvoice.lib xonlines.lib xboxkrnl.lib xbdm.lib xperf.lib $(TargetDir)libretro_xdk.lib"
|
||||
AdditionalDependencies="xapilib.lib d3d8i.lib d3dx8.lib xgraphics.lib dsound.lib xonlines.lib xboxkrnl.lib xbdm.lib xperf.lib $(TargetDir)libretro_xdk.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
@ -166,7 +166,7 @@
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
StackSize="262144"
|
||||
StackSize="65536"
|
||||
IncludeDebugInfo="TRUE"
|
||||
NoLibWarn="TRUE"/>
|
||||
</Configuration>
|
||||
@ -188,7 +188,7 @@
|
||||
EnableFiberSafeOptimizations="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;HAVE_GRIFFIN;inline=_inline;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -202,7 +202,7 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib dmusic.lib xacteng.lib xsndtrk.lib xvoice.lib xonlines.lib xboxkrnl.lib $(TargetDir)libretro_xdk.lib"
|
||||
AdditionalDependencies="xapilib.lib d3d8.lib d3dx8.lib xgraphics.lib dsound.lib xonlines.lib xboxkrnl.lib $(TargetDir)libretro_xdk.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
@ -226,7 +226,7 @@
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
StackSize="262144"/>
|
||||
StackSize="65536"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release_LTCG|Xbox"
|
||||
@ -241,7 +241,7 @@
|
||||
OmitFramePointers="TRUE"
|
||||
OptimizeForProcessor="2"
|
||||
AdditionalIncludeDirectories=""$(SolutionDir)\msvc-stdint";"$(SolutionDir)\msvc-71""
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;HAVE_SCREENSHOTS;WANT_RZLIB;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
PreprocessorDefinitions="NDEBUG;_XBOX;_XBOX1;HAVE_RMENU;HAVE_RMENU_GUI;RARCH_CONSOLE;HAVE_XINPUT_XBOX1;PACKAGE_VERSION=\"0.9.8.4\";__STDC_CONSTANT_MACROS;HAVE_ZLIB;LTCG;HAVE_GRIFFIN;HAVE_RARCH_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;HAVE_RARCH_EXEC;HAVE_DEFAULT_RETROPAD_INPUT;HAVE_VID_CONTEXT;HAVE_DSOUND;HAVE_D3D8;HAVE_FILEBROWSER;WANT_MINIZ;HAVE_SINC;SINC_LOWER_QUALITY"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="TRUE"
|
||||
@ -255,10 +255,10 @@
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="xapilib.lib d3d8ltcg.lib d3dx8.lib xgraphicsltcg.lib dsound.lib dmusicltcg.lib xactengltcg.lib xsndtrk.lib xvoice.lib xonlines.lib xboxkrnl.lib $(TargetDir)libretro_xdk.lib"
|
||||
AdditionalDependencies="xapilib.lib d3d8ltcg.lib d3dx8.lib xgraphicsltcg.lib dsound.lib xonlines.lib xboxkrnl.lib $(TargetDir)libretro_xdk.lib"
|
||||
OutputFile="$(OutDir)/$(ProjectName).exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"
|
||||
GenerateDebugInformation="FALSE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
@ -279,7 +279,8 @@
|
||||
ForceCopy="TRUE"/>
|
||||
<Tool
|
||||
Name="XboxImageTool"
|
||||
StackSize="262144"/>
|
||||
StackSize="65536"
|
||||
IncludeDebugInfo="FALSE"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
|
@ -88,7 +88,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
@ -108,7 +108,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_MINIZ;_DEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
@ -130,7 +130,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_RZLIB;HAVE_SINC;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;HAVE_ZLIB;WANT_MINIZ;HAVE_SINC;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__i686__;HAVE_OVERLAY</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
@ -154,7 +154,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;HAVE_ZLIB;WANT_RZLIB;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;HAVE_WIN32_D3D9;HAVE_CG;HAVE_GLSL;NDEBUG;_WINDOWS;%(PreprocessorDefinitions);HAVE_SCREENSHOTS;HAVE_BSV_MOVIE;HAVE_DINPUT;HAVE_XAUDIO;HAVE_DSOUND;HAVE_OPENGL;HAVE_DYLIB;HAVE_NETPLAY;HAVE_NETWORK_CMD;HAVE_COMMAND;HAVE_STDIN_CMD;HAVE_THREADS;HAVE_DYNAMIC;HAVE_SINC;HAVE_ZLIB;WANT_MINIZ;PACKAGE_VERSION="0.9.8";_CRT_SECURE_NO_WARNINGS;__SSE__;__SSE2__;__x86_64__;HAVE_OVERLAY</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(MSBuildProjectDirectory);$(MSBuildProjectDirectory)\..\..\;$(CG_INC_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<CompileAs>CompileAsCpp</CompileAs>
|
||||
@ -185,7 +185,7 @@
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\cheats.c" />
|
||||
<ClCompile Include="..\..\compat\rxml\rxml.c" />
|
||||
<ClCompile Include="..\..\deps\rzlib\rzlib.c" />
|
||||
<ClCompile Include="..\..\deps\miniz\miniz.c" />
|
||||
<ClCompile Include="..\..\file_extract.c" />
|
||||
<ClCompile Include="..\..\gfx\d3d9\d3d9.cpp" />
|
||||
<ClCompile Include="..\..\gfx\d3d9\render_chain.cpp" />
|
||||
@ -196,6 +196,8 @@
|
||||
<ClCompile Include="..\..\gfx\rpng\rpng.c" />
|
||||
<ClCompile Include="..\..\gfx\shader_cg.c" />
|
||||
<ClCompile Include="..\..\gfx\shader_glsl.c" />
|
||||
<ClCompile Include="..\..\gfx\thread_wrapper.c" />
|
||||
<ClCompile Include="..\..\input\overlay.c" />
|
||||
<ClCompile Include="..\..\performance.c">
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\command.c">
|
||||
|
@ -204,15 +204,21 @@
|
||||
<ClCompile Include="..\..\gfx\shader_glsl.c">
|
||||
<Filter>Source Files\gfx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\deps\rzlib\rzlib.c">
|
||||
<Filter>Source Files\deps</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\file_extract.c">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\gfx\rpng\rpng.c">
|
||||
<Filter>Source Files\gfx\rpng</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\deps\miniz\miniz.c">
|
||||
<Filter>Source Files\deps</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\gfx\thread_wrapper.c">
|
||||
<Filter>Source Files\gfx</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\input\overlay.c">
|
||||
<Filter>Source Files\input</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h">
|
||||
|
@ -38,10 +38,12 @@ typedef int ssize_t;
|
||||
|
||||
// Disable some of the annoying warnings.
|
||||
#pragma warning(disable : 4800)
|
||||
#pragma warning(disable : 4805)
|
||||
#pragma warning(disable : 4244)
|
||||
#pragma warning(disable : 4305)
|
||||
#pragma warning(disable : 4146)
|
||||
#pragma warning(disable : 4267)
|
||||
#pragma warning(disable : 4723)
|
||||
|
||||
#define roundf(in) (in >= 0.0f ? floorf(in + 0.5f) : ceilf(in - 0.5f))
|
||||
|
||||
|
@ -1396,11 +1396,11 @@ static void netplay_post_frame_net(netplay_t *handle)
|
||||
while (first || (handle->tmp_ptr != handle->self_ptr))
|
||||
{
|
||||
pretro_serialize(handle->buffer[handle->tmp_ptr].state, handle->state_size);
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
lock_autosave();
|
||||
#endif
|
||||
pretro_run();
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
unlock_autosave();
|
||||
#endif
|
||||
handle->tmp_ptr = NEXT_PTR(handle->tmp_ptr);
|
||||
|
@ -1023,7 +1023,7 @@ static void ffemu_audio_resample(ffemu_t *handle, struct ffemu_audio_data *data)
|
||||
{
|
||||
// It's always two channels ...
|
||||
struct resampler_data info = {0};
|
||||
info.data_in = (const sample_t*)data->data;
|
||||
info.data_in = (const float*)data->data;
|
||||
info.data_out = handle->audio.resample_out;
|
||||
info.input_frames = data->frames;
|
||||
info.ratio = handle->audio.ratio;
|
||||
|
17
retroarch.c
17
retroarch.c
@ -366,7 +366,7 @@ static bool audio_flush(const int16_t *data, size_t samples)
|
||||
if (!g_extern.audio_active)
|
||||
return false;
|
||||
|
||||
const sample_t *output_data = NULL;
|
||||
const float *output_data = NULL;
|
||||
unsigned output_frames = 0;
|
||||
|
||||
struct resampler_data src_data = {0};
|
||||
@ -482,6 +482,7 @@ static inline void input_poll_overlay(void)
|
||||
unsigned device = input_overlay_full_screen(driver.overlay) ?
|
||||
RARCH_DEVICE_POINTER_SCREEN : RETRO_DEVICE_POINTER;
|
||||
|
||||
bool polled = false;
|
||||
for (unsigned i = 0;
|
||||
input_input_state_func(NULL, 0, device, i, RETRO_DEVICE_ID_POINTER_PRESSED);
|
||||
i++)
|
||||
@ -492,7 +493,11 @@ static inline void input_poll_overlay(void)
|
||||
device, i, RETRO_DEVICE_ID_POINTER_Y);
|
||||
|
||||
driver.overlay_state |= input_overlay_poll(driver.overlay, x, y);
|
||||
polled = true;
|
||||
}
|
||||
|
||||
if (!polled)
|
||||
input_overlay_poll_clear(driver.overlay);
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1640,7 +1645,7 @@ static void init_libretro_cbs(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
static void init_autosave(void)
|
||||
{
|
||||
int ram_types[2] = {-1, -1};
|
||||
@ -2748,7 +2753,7 @@ int rarch_main_init(int argc, char *argv[])
|
||||
if (!g_extern.use_sram)
|
||||
RARCH_LOG("SRAM will not be saved.\n");
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
if (g_extern.use_sram)
|
||||
init_autosave();
|
||||
#endif
|
||||
@ -2828,7 +2833,7 @@ bool rarch_main_iterate(void)
|
||||
do_state_checks();
|
||||
|
||||
// Run libretro for one frame.
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
lock_autosave();
|
||||
#endif
|
||||
|
||||
@ -2855,7 +2860,7 @@ bool rarch_main_iterate(void)
|
||||
netplay_post_frame(g_extern.netplay);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
unlock_autosave();
|
||||
#endif
|
||||
|
||||
@ -2881,7 +2886,7 @@ void rarch_main_deinit(void)
|
||||
deinit_command();
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
#if defined(HAVE_THREADS) && !defined(RARCH_CONSOLE)
|
||||
if (g_extern.use_sram)
|
||||
deinit_autosave();
|
||||
#endif
|
||||
|
@ -65,6 +65,9 @@
|
||||
# Video vsync.
|
||||
# video_vsync = true
|
||||
|
||||
# Use threaded video driver. Using this might improve performance at possible cost of latency and more video stuttering.
|
||||
# video_threaded = false
|
||||
|
||||
# Smoothens picture with bilinear filtering. Should be disabled if using pixel shaders.
|
||||
# video_smooth = true
|
||||
|
||||
|
22
screenshot.c
22
screenshot.c
@ -144,20 +144,6 @@ end:
|
||||
}
|
||||
#endif
|
||||
|
||||
void screenshot_generate_filename(char *filename, size_t size)
|
||||
{
|
||||
time_t cur_time;
|
||||
time(&cur_time);
|
||||
|
||||
#ifdef HAVE_ZLIB_DEFLATE
|
||||
#define IMG_EXT "png"
|
||||
#else
|
||||
#define IMG_EXT "bmp"
|
||||
#endif
|
||||
|
||||
strftime(filename, size, "RetroArch-%m%d-%H%M%S." IMG_EXT, localtime(&cur_time));
|
||||
}
|
||||
|
||||
// Take frame bottom-up.
|
||||
bool screenshot_dump(const char *folder, const void *frame,
|
||||
unsigned width, unsigned height, int pitch, bool bgr24)
|
||||
@ -165,7 +151,13 @@ bool screenshot_dump(const char *folder, const void *frame,
|
||||
char filename[PATH_MAX];
|
||||
char shotname[PATH_MAX];
|
||||
|
||||
screenshot_generate_filename(shotname, sizeof(shotname));
|
||||
#ifdef HAVE_ZLIB_DEFLATE
|
||||
#define IMG_EXT "png"
|
||||
#else
|
||||
#define IMG_EXT "bmp"
|
||||
#endif
|
||||
|
||||
fill_dated_filename(shotname, IMG_EXT, sizeof(shotname));
|
||||
fill_pathname_join(filename, folder, shotname, sizeof(filename));
|
||||
|
||||
#ifdef HAVE_ZLIB_DEFLATE
|
||||
|
30
settings.c
30
settings.c
@ -161,6 +161,7 @@ void config_set_defaults(void)
|
||||
g_settings.video.fullscreen_y = fullscreen_y;
|
||||
g_settings.video.disable_composition = disable_composition;
|
||||
g_settings.video.vsync = vsync;
|
||||
g_settings.video.threaded = video_threaded;
|
||||
g_settings.video.smooth = video_smooth;
|
||||
g_settings.video.force_aspect = force_aspect;
|
||||
g_settings.video.scale_integer = scale_integer;
|
||||
@ -440,6 +441,7 @@ bool config_load_file(const char *path)
|
||||
CONFIG_GET_INT(video.monitor_index, "video_monitor_index");
|
||||
CONFIG_GET_BOOL(video.disable_composition, "video_disable_composition");
|
||||
CONFIG_GET_BOOL(video.vsync, "video_vsync");
|
||||
CONFIG_GET_BOOL(video.threaded, "video_threaded");
|
||||
CONFIG_GET_BOOL(video.smooth, "video_smooth");
|
||||
CONFIG_GET_BOOL(video.force_aspect, "video_force_aspect");
|
||||
CONFIG_GET_BOOL(video.scale_integer, "video_scale_integer");
|
||||
@ -479,13 +481,6 @@ bool config_load_file(const char *path)
|
||||
CONFIG_GET_INT(input.device[i], cfg);
|
||||
}
|
||||
|
||||
#ifdef ANDROID
|
||||
CONFIG_GET_INT(input.icade_profile[0], "input_autodetect_icade_profile_pad1");
|
||||
CONFIG_GET_INT(input.icade_profile[1], "input_autodetect_icade_profile_pad2");
|
||||
CONFIG_GET_INT(input.icade_profile[2], "input_autodetect_icade_profile_pad3");
|
||||
CONFIG_GET_INT(input.icade_profile[3], "input_autodetect_icade_profile_pad4");
|
||||
#endif
|
||||
|
||||
CONFIG_GET_BOOL_EXTERN(console.screen.gamma_correction, "gamma_correction");
|
||||
|
||||
bool msg_enable = false;
|
||||
@ -701,10 +696,22 @@ bool config_load_file(const char *path)
|
||||
CONFIG_GET_PATH(input.overlay, "input_overlay");
|
||||
CONFIG_GET_FLOAT(input.overlay_opacity, "input_overlay_opacity");
|
||||
CONFIG_GET_BOOL(input.debug_enable, "input_debug_enable");
|
||||
|
||||
#ifdef ANDROID
|
||||
CONFIG_GET_BOOL(input.autodetect_enable, "input_autodetect_enable");
|
||||
CONFIG_GET_INT(input.icade_profile[0], "input_autodetect_icade_profile_pad1");
|
||||
CONFIG_GET_INT(input.icade_profile[1], "input_autodetect_icade_profile_pad2");
|
||||
CONFIG_GET_INT(input.icade_profile[2], "input_autodetect_icade_profile_pad3");
|
||||
CONFIG_GET_INT(input.icade_profile[3], "input_autodetect_icade_profile_pad4");
|
||||
#endif
|
||||
|
||||
int low_ram_mode = 0;
|
||||
if (config_get_int(conf, "rmenu_low_ram_mode_enable", &low_ram_mode))
|
||||
{
|
||||
if (low_ram_mode == 1)
|
||||
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE);
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "environment_variables",
|
||||
&g_extern.system.environment))
|
||||
{
|
||||
@ -1196,6 +1203,15 @@ bool config_save_file(const char *path)
|
||||
config_set_int(conf, "input_autodetect_icade_profile_pad4", input.icade_profile[3]);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_RMENU
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE))
|
||||
config_set_int(conf, "rmenu_low_ram_mode_enable", 1);
|
||||
else if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_LOW_RAM_MODE_ENABLE_PENDING))
|
||||
config_set_int(conf, "rmenu_low_ram_mode_enable", 1);
|
||||
else
|
||||
config_set_int(conf, "rmenu_low_ram_mode_enable", 0);
|
||||
#endif
|
||||
|
||||
if (g_extern.lifecycle_mode_state & (1ULL << MODE_VIDEO_OVERSCAN_ENABLE))
|
||||
config_set_bool(conf, "overscan_enable", true);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user