[mupen64plus-input-sdl] 183/196: Imported Upstream version 2.5
Sven Eckelmann
ecsv-guest at moszumanska.debian.org
Thu Nov 26 06:00:44 UTC 2015
This is an automated email from the git hooks/post-receive script.
ecsv-guest pushed a commit to branch master
in repository mupen64plus-input-sdl.
commit 0d89670cec89a29696e65756081c0dca25b59520
Author: Sven Eckelmann <sven at narfation.org>
Date: Tue Apr 28 22:22:35 2015 +0200
Imported Upstream version 2.5
---
AUTHORS | 1 +
LICENSES | 5 +
RELEASE | 10 +
data/InputAutoCfg.ini | 237 +++++++++++++++++++-
.../mupen64plus-input-sdl.vcxproj | 8 +-
projects/msvc8/mupen64plus-input-sdl.vcproj | 240 ---------------------
projects/unix/Makefile | 33 +--
src/autoconfig.c | 12 +-
src/config.c | 12 +-
src/osal_dynamiclib_unix.c | 4 +-
src/osal_dynamiclib_win32.c | 4 +-
src/plugin.c | 17 +-
src/plugin.h | 3 +-
src/sdl_key_converter.c | 2 +
src/sdl_key_converter.h | 4 +-
src/version.h | 2 +-
16 files changed, 292 insertions(+), 302 deletions(-)
diff --git a/AUTHORS b/AUTHORS
index afcbe3e..e6bb886 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,4 +1,5 @@
Original author: Gregor Anich <blight>
Subsequent authors: many people from the Mupen64Plus team have worked on this code.
+See the LICENSES file for more details.
diff --git a/LICENSES b/LICENSES
index 0d30700..6a5bd79 100644
--- a/LICENSES
+++ b/LICENSES
@@ -14,7 +14,12 @@ The authors of Mupen64Plus-input-sdl are:
* Louai Al-Khanji (slougi)
* Bob Forder (orbitaldecay)
* Jason Espinosa (hasone)
+ * Bobby Smiles (bsmiles32)
+ * conchurnavid
+ * Fayvel
* HyperHacker
+ * Nebuleon
+ * s-verma
* and others.
Mupen64Plus is based on GPL-licensed source code from Mupen64 v0.5, originally written by:
diff --git a/RELEASE b/RELEASE
index 49a935f..8fce64e 100644
--- a/RELEASE
+++ b/RELEASE
@@ -1,6 +1,16 @@
SDL Input plugin for Mupen64Plus
--------------------------------
+Mupen64Plus-input-sdl v2.5 - April 26, 2015
+-------------------------------------------
+ - use SDL1.2 keysyms in the mupen64plus.cfg file Input section even when built against SDL2, with keysym converter
+ - SDL2: support for mapping mouse to controller analog x/y
+ - SDL2: improve/simplify rumble effect code
+ - use prioritization to decide among multiple matching auto-config sections (for SDL2 / XInput)
+ - New auto-config sections for: Wiimote Classic, Wii U Gamecube / Pro, MS SideWinder GamePad Pro, 17 others
+ - When Mouse=True but pointer is un-grabbed, fall back to joystick settings for analog x/y
+ - Prevent mouse/trackpad auto-centering behavior by pressing left-Windows key
+
Mupen64Plus-input-sdl v2.0 - July 4, 2013
-----------------------------------------
- re-write auto-configuration logic to be more user friendly. Add new 'mode' parameter.
diff --git a/data/InputAutoCfg.ini b/data/InputAutoCfg.ini
old mode 100755
new mode 100644
index 726d5a0..555490d
--- a/data/InputAutoCfg.ini
+++ b/data/InputAutoCfg.ini
@@ -277,6 +277,31 @@ Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
+[GS gamepad]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = hat(0 Right)
+DPad L = hat(0 Left)
+DPad D = hat(0 Down)
+DPad U = hat(0 Up)
+Start = button(9)
+Z Trig = button(7)
+B Button = button(2)
+A Button = button(0)
+C Button R = axis(2+)
+C Button L = axis(2-)
+C Button D = axis(3+)
+C Button U = axis(3-)
+R Trig = button(5)
+L Trig = button(4)
+Mempak switch =
+Rumblepak switch =
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
[ipega media gamepad controller]
plugged = True
plugin = 2
@@ -529,6 +554,31 @@ Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
+[Mega World Thrustmaster dual analog 3.2]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = hat(0 Right)
+DPad L = hat(0 Left)
+DPad D = hat(0 Down)
+DPad U = hat(0 Up)
+Start = button(9)
+Z Trig = button(8)
+B Button = button(1)
+A Button = button(0)
+C Button R = axis(2+)
+C Button L = axis(2-)
+C Button D = axis(3+)
+C Button U = axis(3-)
+R Trig = button(6)
+L Trig = button(4)
+Mempak switch = button(5)
+Rumblepak switch = button(7)
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
[Mega World USB Game Controllers]
plugged = True
plugin = 2
@@ -579,13 +629,37 @@ Rumblepak switch = button(11)
Y Axis = axis(1-,1+)
X Axis = axis(0-,0+)
+[Linux: Xbox 360 Wireless Receiver (XBOX)]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = hat(0 Right)
+DPad L = hat(0 Left)
+DPad D = hat(0 Down)
+DPad U = hat(0 Up)
+Start = button(7)
+Z Trig = axis(2+)
+B Button = button(2)
+A Button = button(0)
+C Button R = axis(3+)
+C Button L = axis(3-) button(3)
+C Button D = axis(4+) button(1)
+C Button U = axis(4-)
+R Trig = button(5) axis(5+)
+L Trig = button(4)
+Mempak switch =
+Rumblepak switch =
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
[Microsoft X-Box 360 pad]
+[Microsoft X-Box One pad]
[Win32: Controller (XBOX 360 For Windows)]
[Win32: XBOX 360 For Windows (Controller)]
[Win32: XBOX 360 For Windows]
[Xbox 360 Wireless Receiver]
-[OSX: Wireless 360 Controller]
-[OSX: Controller]
[Linux: Xbox Gamepad (userspace driver)]
plugged = True
plugin = 2
@@ -611,6 +685,33 @@ Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
+# mappings for use with the TattieBogle drive under OSX, given in googlecode.com issue #630
+[OSX: Wireless 360 Controller]
+[OSX: Controller]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = button(3)
+DPad L = button(2)
+DPad D = button(0)
+DPad U = button(1)
+Start = button(4)
+Z Trig = axis(5+)
+B Button = button(13)
+A Button = button(11)
+C Button R = axis(2+)
+C Button L = axis(2-)
+C Button D = axis(3+)
+C Button U = axis(3-)
+R Trig = button(9)
+L Trig = button(8)
+Mempak switch = ""
+Rumblepak switch = ""
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
; ACRUX Gamepad (USB ID: 1a34:0802), a Xbox 360 controller clone aviable under
; various brands (e.g. techsolo TG-30)
[USB GAMEPAD 8116]
@@ -643,6 +744,7 @@ Y Axis = axis(1-,1+)
[XInput: XBOX 360 For Windows (Controller)]
[XInput: XBOX 360 For Windows]
[XInput: Xbox 360 Wireless Receiver]
+[XInput: XInput Controller #]
plugged = True
plugin = 2
mouse = False
@@ -768,6 +870,8 @@ X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
[PLAYSTATION(R)3 Controller]
+[Sony PLAYSTATION(R)3 Controller]
+[Sony Computer Entertainment Wireless Controller]
[SHENGHIC 2009/0708ZXW-V1Inc. PLAYSTATION(R)3Conteroller]
plugged = True
plugin = 2
@@ -779,7 +883,7 @@ DPad L = button(7)
DPad D = button(6)
DPad U = button(4)
Start = button(3)
-Z Trig = button(8)
+Z Trig = button(10)
B Button = button(15)
A Button = button(14)
C Button R = axis(2+)
@@ -787,7 +891,7 @@ C Button L = axis(2-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(11)
-L Trig = button(10)
+L Trig = button(8)
Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
@@ -1020,6 +1124,31 @@ Rumblepak switch =
Y Axis = axis(1-,1+)
X Axis = axis(0-,0+)
+[Wii U GameCube Adapter Port 1]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = button(11)
+DPad L = button(10)
+DPad D = button(9)
+DPad U = button(8)
+Start = button(7)
+Z Trig = button(4)
+B Button = button(3)
+A Button = button(0)
+C Button R = axis(3+)
+C Button L = axis(3-)
+C Button D = axis(4+)
+C Button U = axis(4-)
+R Trig = button(5)
+L Trig = button(4)
+Mempak switch =
+Rumblepak switch =
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
[WiseGroup.,Ltd TigerGame XBOX+PS2+GC Game Controller Adapter]
plugged = True
plugin = 2
@@ -1046,6 +1175,7 @@ X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
[Wish Technologies Adaptoid]
+[Adaptoid]
plugged = True
plugin = 2
mouse = False
@@ -1323,3 +1453,102 @@ Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
+
+[USB,2-axis 8-button gamepad]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = axis(0+)
+DPad L = axis(0-)
+DPad D = axis(1+)
+DPad U = axis(1-)
+Start = button(7)
+Z Trig = button(6)
+B Button = button(1)
+A Button = button(0)
+C Button R = button(2)
+C Button L = button(3)
+C Button D = button(99)
+C Button U = button(99)
+R Trig = button(4)
+L Trig = button(5)
+Mempak switch = key(109)
+Rumblepak switch = key(114)
+Y Axis = axis(1-,1+)
+X Axis = axis(0-,0+)
+
+; RetroUSB "USB N64 RetroPort"
+[N64 ]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 2048,2048
+AnalogPeak = 18432,18432
+DPad R = button(0)
+DPad L = button(1)
+DPad D = button(2)
+DPad U = button(3)
+Start = button(4)
+Z Trig = button(5)
+B Button = button(6)
+A Button = button(7)
+C Button R = button(8)
+C Button L = button(9)
+C Button D = button(10)
+C Button U = button(11)
+R Trig = button(12)
+L Trig = button(13)
+Mempak switch =
+Rumblepak switch =
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
+[Jess Tech GGE909 PC Recoil Pad]
+plugged = True
+plugin = 2
+mouse = False
+AnalogDeadzone = 4096,4096
+AnalogPeak = 32768,32768
+DPad R = hat(0 Right)
+DPad L = hat(0 Left)
+DPad D = hat(0 Down)
+DPad U = hat(0 Up)
+Start = button(9)
+Z Trig = button(7)
+B Button = button(0)
+A Button = button(2)
+C Button R = axis(3+)
+C Button L = axis(3-)
+C Button D = axis(2+)
+C Button U = axis(2-)
+R Trig = button(6)
+L Trig = button(4)
+Mempak switch = button(10)
+Rumblepak switch = button(11)
+X Axis = axis(0-,0+)
+Y Axis = axis(1-,1+)
+
+[8BITDO NES30]
+plugged = True
+plugin = 2
+mouse = False
+DPad R = key(3)
+DPad L = key(2)
+DPad D = key(5)
+DPad U = key(0)
+Start = key(22)
+Z Trig = key(21)
+B Button = key(12)
+A Button = key(11)
+C Button R = key(3)
+C Button L = key(2)
+C Button D = key(5)
+C Button U = key(0)
+R Trig = key(99)
+L Trig = key(120)
+Mempak switch = key(44)
+Rumblepak switch = key(46)
+X Axis = key(276,275)
+Y Axis = key(273,274)
diff --git a/projects/msvc11/mupen64plus-input-sdl.vcxproj b/projects/VisualStudio2013/mupen64plus-input-sdl.vcxproj
similarity index 96%
rename from projects/msvc11/mupen64plus-input-sdl.vcxproj
rename to projects/VisualStudio2013/mupen64plus-input-sdl.vcxproj
index 992056a..aa8e1f4 100644
--- a/projects/msvc11/mupen64plus-input-sdl.vcxproj
+++ b/projects/VisualStudio2013/mupen64plus-input-sdl.vcxproj
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -20,12 +20,12 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
- <PlatformToolset>v110</PlatformToolset>
+ <PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -111,4 +111,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
\ No newline at end of file
diff --git a/projects/msvc8/mupen64plus-input-sdl.vcproj b/projects/msvc8/mupen64plus-input-sdl.vcproj
deleted file mode 100644
index abb877a..0000000
--- a/projects/msvc8/mupen64plus-input-sdl.vcproj
+++ /dev/null
@@ -1,240 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="8.00"
- Name="mupen64plus-input-sdl"
- ProjectGUID="{7F3178D0-0E2E-471B-9160-69F0354F9DE9}"
- RootNamespace="mupen64plusinputsdl"
- Keyword="Win32Proj"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="2"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="..\..\..\mupen64plus-core\src\api;..\..\..\mupen64plus-win32-deps\SDL-1.2.14\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
- RuntimeLibrary="2"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- Detect64BitPortabilityProblems="false"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="..\..\..\mupen64plus-win32-deps\SDL-1.2.14\lib\SDL.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCWebDeploymentTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath="..\..\src\autoconfig.c"
- >
- </File>
- <File
- RelativePath="..\..\src\config.c"
- >
- </File>
- <File
- RelativePath="..\..\src\osal_dynamiclib_win32.c"
- >
- </File>
- <File
- RelativePath="..\..\src\plugin.c"
- >
- </File>
- <File
- RelativePath="..\..\src\sdl_key_converter.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Header Files"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath="..\..\src\autoconfig.h"
- >
- </File>
- <File
- RelativePath="..\..\src\config.h"
- >
- </File>
- <File
- RelativePath="..\..\src\osal_dynamiclib.h"
- >
- </File>
- <File
- RelativePath="..\..\src\osal_preproc.h"
- >
- </File>
- <File
- RelativePath="..\..\src\plugin.h"
- >
- </File>
- <File
- RelativePath="..\..\src\sdl_key_converter.h"
- >
- </File>
- <File
- RelativePath="..\..\src\version.h"
- >
- </File>
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/projects/unix/Makefile b/projects/unix/Makefile
old mode 100644
new mode 100755
index f1b89c0..777c829
--- a/projects/unix/Makefile
+++ b/projects/unix/Makefile
@@ -69,10 +69,9 @@ ifeq ("$(OS)","NONE")
$(error OS type "$(UNAME)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
endif
-# detect system architecture
+# detect system architecture, only if it matters for build flags
HOST_CPU ?= $(shell uname -m)
-NO_ASM ?= 1
-CPU := NONE
+CPU := OTHER
ifneq ("$(filter x86_64 amd64,$(HOST_CPU))","")
CPU := X86
ifeq ("$(BITS)", "32")
@@ -88,30 +87,8 @@ ifneq ("$(filter pentium i%86,$(HOST_CPU))","")
ARCH_DETECTED := 32BITS
PIC ?= 0
endif
-ifneq ("$(filter ppc macppc socppc powerpc,$(HOST_CPU))","")
- CPU := PPC
- ARCH_DETECTED := 32BITS
- BIG_ENDIAN := 1
- PIC ?= 1
- $(warning Architecture "$(HOST_CPU)" not officially supported.')
-endif
-ifneq ("$(filter ppc64 powerpc64,$(HOST_CPU))","")
- CPU := PPC
- ARCH_DETECTED := 64BITS
- BIG_ENDIAN := 1
+ifeq ("$(CPU)","OTHER")
PIC ?= 1
- $(warning Architecture "$(HOST_CPU)" not officially supported.')
-endif
-ifneq ("$(filter arm%,$(HOST_CPU))","")
- ifeq ("$(filter arm%b,$(HOST_CPU))","")
- CPU := ARM
- ARCH_DETECTED := 32BITS
- PIC ?= 1
- $(warning Architecture "$(HOST_CPU)" not officially supported.')
- endif
-endif
-ifeq ("$(CPU)","NONE")
- $(error CPU type "$(HOST_CPU)" not supported. Please file bug report at 'http://code.google.com/p/mupen64plus/issues')
endif
# base CFLAGS, LDLIBS, and LDFLAGS
@@ -128,10 +105,6 @@ else
CFLAGS += -fno-PIC
endif
-ifeq ($(BIG_ENDIAN), 1)
- CFLAGS += -DM64P_BIG_ENDIAN
-endif
-
# tweak flags for 32-bit build on 64-bit system
ifeq ($(ARCH_DETECTED), 64BITS_32)
CFLAGS += -m32
diff --git a/src/autoconfig.c b/src/autoconfig.c
old mode 100755
new mode 100644
index 9651090..246ca81
--- a/src/autoconfig.c
+++ b/src/autoconfig.c
@@ -19,12 +19,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include "m64p_types.h"
+#include "autoconfig.h"
#include "m64p_config.h"
+#include "m64p_types.h"
#include "osal_preproc.h"
-#include "autoconfig.h"
#include "plugin.h"
/* local definitions */
@@ -212,6 +214,12 @@ int auto_set_defaults(int iDeviceIdx, const char *joySDLName)
fseek(pfIn, 0L, SEEK_END);
iniLength = ftell(pfIn);
fseek(pfIn, 0L, SEEK_SET);
+ if (iniLength < 0) {
+ DebugMessage(M64MSG_ERROR, "Couldn't get size of config file '%s'", CfgFilePath);
+ fclose(pfIn);
+ return 0;
+ }
+
pchIni = (char *) malloc(iniLength + 1);
if (pchIni == NULL)
{
diff --git a/src/config.c b/src/config.c
index 5865f72..74cf781 100644
--- a/src/config.c
+++ b/src/config.c
@@ -20,19 +20,19 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <SDL.h>
+#include <stdio.h>
+#include <string.h>
#define M64P_PLUGIN_PROTOTYPES 1
-#include "m64p_types.h"
-#include "m64p_plugin.h"
+#include "autoconfig.h"
+#include "config.h"
#include "m64p_config.h"
-
+#include "m64p_plugin.h"
+#include "m64p_types.h"
#include "osal_preproc.h"
-#include "autoconfig.h"
#include "plugin.h"
#include "sdl_key_converter.h"
-#include "config.h"
-
#define HAT_POS_NAME( hat ) \
((hat == SDL_HAT_UP) ? "Up" : \
((hat == SDL_HAT_DOWN) ? "Down" : \
diff --git a/src/osal_dynamiclib_unix.c b/src/osal_dynamiclib_unix.c
index b3b7ba5..8821ffc 100644
--- a/src/osal_dynamiclib_unix.c
+++ b/src/osal_dynamiclib_unix.c
@@ -19,9 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <stdio.h>
#include <dlfcn.h>
+#include <stdio.h>
+#include <stdlib.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
diff --git a/src/osal_dynamiclib_win32.c b/src/osal_dynamiclib_win32.c
index 685d717..751e1b0 100644
--- a/src/osal_dynamiclib_win32.c
+++ b/src/osal_dynamiclib_win32.c
@@ -19,9 +19,9 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <windows.h>
-#include <stdlib.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <windows.h>
#include "m64p_types.h"
#include "osal_dynamiclib.h"
diff --git a/src/plugin.c b/src/plugin.c
old mode 100755
new mode 100644
index 9f4a202..2e2cd95
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -21,28 +21,27 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include <SDL.h>
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <SDL.h>
-
#define M64P_PLUGIN_PROTOTYPES 1
-#include "m64p_types.h"
-#include "m64p_plugin.h"
+#include "config.h"
#include "m64p_common.h"
#include "m64p_config.h"
-
+#include "m64p_plugin.h"
+#include "m64p_types.h"
+#include "osal_dynamiclib.h"
#include "plugin.h"
-#include "config.h"
#include "version.h"
-#include "osal_dynamiclib.h"
#ifdef __linux__
-#include <unistd.h>
#include <dirent.h>
#include <fcntl.h>
#include <sys/types.h>
+#include <unistd.h>
#include <linux/input.h>
#endif /* __linux__ */
@@ -255,7 +254,7 @@ EXPORT m64p_error CALL PluginGetVersion(m64p_plugin_type *PluginType, int *Plugi
/* Helper function to handle the SDL keys */
static void
-doSdlKeys(unsigned char* keystate)
+doSdlKeys(const unsigned char* keystate)
{
int c, b, axis_val, axis_max_val;
static int grabmouse = 1, grabtoggled = 0;
diff --git a/src/plugin.h b/src/plugin.h
index e260f59..2d1db0e 100644
--- a/src/plugin.h
+++ b/src/plugin.h
@@ -25,6 +25,7 @@
#define __PLUGIN_H__
#include <SDL.h>
+#include <string.h>
#if ! SDL_VERSION_ATLEAST(1,3,0)
#define SDL_GetKeyboardState SDL_GetKeyState
@@ -67,8 +68,8 @@ static inline const char* _SDL_JoystickName(int device_index)
#endif
#define M64P_PLUGIN_PROTOTYPES 1
-#include "m64p_plugin.h"
#include "m64p_config.h"
+#include "m64p_plugin.h"
#define DEVICE_NO_JOYSTICK (-1)
diff --git a/src/sdl_key_converter.c b/src/sdl_key_converter.c
index 058c4da..b1fc36c 100644
--- a/src/sdl_key_converter.c
+++ b/src/sdl_key_converter.c
@@ -20,7 +20,9 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "sdl_key_converter.h"
+
#include <stdint.h>
+
#define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
uint16_t sdl_keysym2scancode(uint16_t keysym)
diff --git a/src/sdl_key_converter.h b/src/sdl_key_converter.h
index 72a17df..4fb12f3 100644
--- a/src/sdl_key_converter.h
+++ b/src/sdl_key_converter.h
@@ -19,8 +19,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include "osal_preproc.h"
#include <SDL.h>
+#include <stdint.h>
+
+#include "osal_preproc.h"
uint16_t sdl_keysym2scancode(uint16_t keysym);
uint16_t sdl_scancode2keysym(uint16_t scancode);
diff --git a/src/version.h b/src/version.h
index 1bd0b08..a0bedf6 100644
--- a/src/version.h
+++ b/src/version.h
@@ -27,7 +27,7 @@
#define VERSION_H
#define PLUGIN_NAME "Mupen64Plus SDL Input Plugin"
-#define PLUGIN_VERSION 0x020000
+#define PLUGIN_VERSION 0x020500
#define INPUT_PLUGIN_API_VERSION 0x020000
#define CONFIG_API_VERSION 0x020100
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/mupen64plus-input-sdl.git
More information about the Pkg-games-commits
mailing list