Commit Graph

9577 Commits

Author SHA1 Message Date
Gregory Hainaut 31d8142a0d onepad: plug uid instead of the index
ini must be recreated
2017-04-28 11:27:19 +02:00
Gregory Hainaut 3cff588eff onepad: add an unique identifier 2017-04-28 11:27:19 +02:00
Gregory Hainaut a50766384b onepad: use range loop for hash iteration 2017-04-28 11:27:19 +02:00
Gregory Hainaut c183de5662 onepad: add hot-plugging support
Note: pad to player mapping is done later

v2: remove the useless print
2017-04-28 11:27:19 +02:00
Gregory Hainaut 1b369520ed onepad: drop the pad if an error was detected
v2:
init m_no_error in gamepad constructor
2017-04-28 11:27:19 +02:00
Gregory Hainaut 2e09c7faf3 onepad: Move init/destroy code to constructor/destructor
* prefix remaining member with m_
* Use array for m_effect_id
* Properly Destroy/Close Haptic/Joystick/Game Controller
 (except on older SDL versions which are buggy)
2017-04-28 11:27:19 +02:00
Gregory Hainaut 4b24cfa5ea onepad: use external resource to support more joysticks 2017-04-28 11:27:19 +02:00
Gregory Hainaut 9da843c994 onepad: plug SDL2 API game controller 2017-04-28 11:27:19 +02:00
Gregory Hainaut 35b162adbf onepad: move enum first in .h file
It would avoid future compilation issue
2017-04-28 11:27:19 +02:00
Gregory Hainaut 94e19ac903 onepad: remove SDL1 manual detection code path 2017-04-28 11:27:19 +02:00
Gregory Hainaut 61182249f0 onepad: drop hacks/options for DualShock3
SDL2 will take care of correct detection
2017-04-28 11:27:19 +02:00
Gregory Hainaut 5c537fdbe3 onepad: properly indent comments
Clang-format doesn't like the double *
2017-04-28 11:27:19 +02:00
Gregory Hainaut 9c7e9cc6f2 onepad: use range loop and vector of unique_ptr to manage the joystick 2017-04-28 11:27:19 +02:00
Gregory Hainaut 873ae6717e onepad: add a game controller db resource
It will be used later by the SDL2 API
2017-04-28 11:27:19 +02:00
Gregory Hainaut d3a3a8528f cmake: reindent onepad/CMakeLists.txt with space 2017-04-28 11:27:19 +02:00
Gregory Hainaut 41990a6402 cmake: create the macro add_custom_glib_res to handle resources 2017-04-28 11:27:19 +02:00
Jonathan Li ffcac1bc3b spu2-x:xaudio2: Comment stuff to investigate 2017-04-28 10:12:50 +02:00
Jonathan Li adb92ce349 spu2-x:xaudio2: Use unique_ptr
Also remove the unused constructor parameter from StreamingVoice and
rename the variables slightly.
2017-04-28 10:12:50 +02:00
Jonathan Li 14bd5a4f59 spu2-x:xaudio2: Improve cleanup after an exception
Initialise pointers to nullptr, move the LoadLibrary code into the try
block (where it should have been in the first place), and use Close()
to cleanup if an exception occurs. Also initialise/destroy the critical
section in the base class constructor/destructor.

This should avoid resource leaks if an exception occurs.
2017-04-28 10:12:50 +02:00
Jonathan Li 6c512c1973 spu2-x:xaudio2: Simplify XAudio2Error exception
Instead of creating a separate message function, just reuse what() and
pass the string to the std::runtime_error constructor instead.

Also catch a reference to a std::runtime_error instead, since it'll
allow for simpler cleanup.
2017-04-28 10:12:50 +02:00
Jonathan Li 3cb0e3bb13 spu2-x: Combine XAudio2 2.7/2.8+ code into an inline file
Avoids code duplication, though there's now messy ifdefs...
2017-04-28 10:12:50 +02:00
lightningterror 303564fd70 GSdx: Move/add GT4 CRC
Moved a CRC hack to Aggressive that can cause or fix VRAM and RAM spikes.
This way people can switch between each config if they experience problems with either.
Varies on userconfig , game version and maybe hardware.

Added missing CRC game version for GT4 pal.

Note: The issue might be the same on GT3 and GTConcept , the code might
need to be removed for those games as well.
2017-04-27 17:46:58 +02:00
Gregory Hainaut 99180f5afb pcsx2: call XInitThreads at init
X11 isn't thread safe by default. It make sense in 1990 but it is ugly nowadays.

The trick is that is must called before any X11 function. So the only
safe place is at the start of the main.  Pcsx2App::OnInit() is the
sooner that I've found.
2017-04-26 21:23:31 +02:00
Kazushim 201c9cd2a4 zh_CN mo files update 2017-04-23 16:00:19 +02:00
Kazushim 07df39c208 zh_CN po files update 2017-04-23 16:00:19 +02:00
Gregory Hainaut b2a2a3ace1 cmake: update "check these lib..." strings
wx 3.10 is the minimum
sdl2 too for onepad
a recent glew/gtk2 version is enough
2017-04-23 10:59:33 +02:00
Gregory Hainaut bb35261aca gsdx: don't request a depth buffer on the window
Code directly uses depth buffer attached to a frame buffer
2017-04-23 10:59:33 +02:00
Gregory Hainaut 2155f65478 gsdx: fix EGL build 2017-04-23 10:59:33 +02:00
Jonathan Li 16904d580d pcsx2: Fix booting ISO from commandline 2017-04-21 22:45:19 +01:00
refractionpcsx2 cca6e1dcae Merge pull request #1896 from ssakash/counterstuff
PCSX2-Counters: Detect DVD variant videomodes
2017-04-21 10:26:58 +01:00
FlatOutPS2 47c2f0a289 GSdx: Remove Dirge Of Cerberus CRC hack
Hack was used to remove garbage data rectangles from popping up on screen when objects and characters were added to or removed from the world.
This issue is now being handled by OI_DoubleHalfClear in GSRendererHW.cpp, so the hack is no longe necessary and has been removed.
2017-04-21 11:13:27 +02:00
FlatOutPS2 7392f52184 GSdx: Move Resident Evil 4 and The Getaway series CRC hacks
Moves Resident Evil 4 hack to Aggressive level as it is no longer
required to fix any issues, but does offer a decent speed boost.

Moves The Getaway & The Getaway Black Monday CRC hack to Full level, as the issue can be resolved
when using the OpenGL Hardware renderer.
2017-04-21 11:13:27 +02:00
Jonathan Li 620b9b3300 pcsx2: Avoid clearing current ISO when not autorunning with an ISO 2017-04-21 10:54:16 +02:00
Jonathan Li 92b1f3cf6d pcsx2: Fix "nodisc" commandline option
It was present in the help text but didn't actually do anything.
2017-04-21 10:54:16 +02:00
Jonathan Li 088aa2ffdc pcsx2: Fix autorun when commandline and current CDVD options differ
Fixes an issue where the game will either boot the wrong CDVD source or
fail to boot if the current CDVD option doesn't match the option
specified in the command line.
2017-04-21 10:54:16 +02:00
Gregory Hainaut 688f05ff26 gsdx sw: always enable the gs memory wrapping emulation 2017-04-21 10:53:05 +02:00
Gregory Hainaut c115a4cf76 Merge branch 'greg/onepad-legacy' 2017-04-19 19:02:49 +02:00
Gregory Hainaut ef3435441f onepad: create a legacy version for SDL1
The legacy version is the version 1.3

The new version is the version 2.0. It would be based on SDL2 only

Distribution information.
If you link wxWidget with SDL, you will need to be sure it is SDL2 or upgrade.

You can build wxWidget with SDL2 with the following trick

export SDL_CONFIG=/usr/bin/sdl2-config
./configure --with-sdl .....
2017-04-19 19:02:36 +02:00
Akash 73a879caad PCSX2-Counters: Detect DVD variant videomodes
Improved the video mode detection code by also detecting the DVD variant video modes of NTSC & PAL, PSX mode actually make use of these specific variants, as well as the BIOS. Previously, I just had them as a single bios video mode due to laziness. (I know, my bad)

After further research, it seems that these DVD variant modes have their own individual VSync timing values similar to the standard NTSC & PAL video modes, dealing with those timer codes might be essential in getting timing accuracy of the PSX mode games. (I kept it to default NTSC/PAL values for now, interested people can mess with it later)

I had planned to do this before but there some were concerns that two different video modes make use of 0x73 gate in SetGsCrt, which was rather weird (how the heck could two video modes be used in a single param value?)

 0x73- DVDPAL        ( 720 x  480 @ ??.???Hz)
 0x73- DVD480P       ( 720 x  480 @ ??.???Hz)

Hence, we had decided to use the CMOD bit from SMODE1 (AKA color subcarrier frequency) to detect whether it's an analog or digital video mode and update the necessary timing values but seems like it's no longer necessary, after further discussions from some PS2 developers, we've come to the conclusion that only DVDPAL is possible via 0x73 in SetGsCrt. (So I assume the DVD480p init possibility was fake info from Blue and those other GSM guys who were reverse engineering the PS2)
2017-04-19 21:49:43 +05:30
Kingcom 92aa270062 Align functions to up to 16 bytes in the function scanner 2017-04-19 08:34:03 +02:00
Jonathan Li d23caa9b72 ci: Initialise git submodules in AppVeyor 2017-04-17 23:03:21 +01:00
Kingcom 4b9d409628 Make memory view row size configurable, store it and "Align window to row size" in settings 2017-04-15 22:48:33 +01:00
Gregory Hainaut a378e307b3 common: drop pthread TLS emulation
thread_local is supported by all C++11 compliant compiler

Keep a way to disable TLS for shared object to avoid issue of DTV
slot shortage.
2017-04-14 17:18:20 +02:00
KousukeItsagame 11aebe465f common: Replace __threadlocal with C++11 thread_local 2017-04-13 19:59:00 +02:00
Gregory Hainaut 3b97137ccf linux: mesa full steam ahead !
Enable multithread openGL
* Might be slower until all improvements are merged to mesa

Disable error validation
* Not yet merged
2017-04-13 18:04:53 +02:00
Gregory Hainaut 24eb1627e5 gsdx: add GStempdir wrapper to get a tempory directory
Allow to use Linux compatible code for OpenCL
2017-04-12 18:39:11 +02:00
Gregory Hainaut 2b30e7880e gsdx: add GSmkdir for windows based on CreateDirectory
v2: use nullptr
2017-04-12 18:39:11 +02:00
Gregory Hainaut 2d0a61fc8d gsdx ogl: use load resource to load shader
* Windows behavior must be checked
* remove glsl_source.h

v2: fix missing include
Big thanks to Turtleli

v3:
fix indentation in gsdx-res.xml
add dependency in cmake
remove old res/glsl/fxaa.fx symlink
add tfx.cl for OpenCL support on Linux

v4, v5
fix cmake indentation
2017-04-12 18:09:06 +02:00
Gregory Hainaut 38c4f5b6e7 gsdx: always NULL terminate resources on Windows
It is done automatically on Linux. Strings are much
better with this NULL char ;)

All credits go to turtleli

v2: increase resize instead of push_back NULL char
2017-04-12 18:09:06 +02:00
Gregory Hainaut ebae8b65f8 gsdx linux: implement GSdxApp::LoadResource based on g_resource
v2: use early return to reduce code/branch complexity
v3: use nullptr
2017-04-12 18:09:06 +02:00