Commit Graph

208 Commits

Author SHA1 Message Date
Jonathan Li eb8ede38cf lilypad: Use l length modifier for wide character string
w is Windows specific. Fixes a gcc and clang warning.
2017-03-23 22:35:49 +00:00
FlatOutPS2 f3a89f59e4 LilyPad: General fixes and UI improvements
Some general fixes and UI improvements.

Adds Reset Configuration to Input/Force Feedback configuration screens that resets the configuration for the selected control(s).

Adds Restore Defaults button to the General tab that deletes all LilyPad
Settings and bindings and resets to the default settings.

Adds double-click functionality to the PAD list on the General tab,
which will now send the user straight to the corresponding PAD tab.
2017-03-16 22:43:53 +00:00
FlatOutPS2 84a8fdadc5 LilyPad: Fix F4 button (PCSX2 FrameLimiter toggle) getting blocked
Fixes issue where losing focus after pressing alt-tab would end up
blocking the F4 button (which is used for turning the PCSX2 FrameLimiter
on and off).

Fixes: https://github.com/PCSX2/pcsx2/issues/1797
2017-03-16 22:43:53 +00:00
FlatOutPS2 bd45bab34a LilyPad: Display a warning when all controls are inactive
Displays a console warning if no controls/controllers are active and the
emulation cannot be controlled.
2017-03-16 22:43:53 +00:00
FlatOutPS2 2ea078beb5 LilyPad: Add Quick Setup
Adds quick setup that allows for quickly setting up all the default pad
buttons without having to click on each one separately.

Hides special inputs(inputs that aren't available on a PS(2) controller) by default.
2017-03-16 22:43:53 +00:00
FlatOutPS2 3075ec2203 LilyPad: Improve analog/pressure sensitive detection
Improves detection of analog or pressure sensitive support, which previously made some games unable to detect the correct mode.
2017-03-16 22:43:53 +00:00
Gregory Hainaut da1bb43618 cmake: Add various missing file in CMakeLists.txt
Add some windows code path. It would reduce the burden to port Cmake to windows.
(sill miss 3rdparty/some plugins/...)
2017-02-16 20:11:57 +01:00
FlatOutPS2 8d00ae25c4 LilyPad: UI restructure
UI restructure and improvements.
2017-01-26 19:46:37 +01:00
FlatOutPS2 6074d60a90 LilyPad: Replace Turbo hack
The "L3 Toggles Turbo" hack has been removed and been replaced by a
bindable Turbo button on the Pad tabs. The Turbo function in the input
configuration has been renamed Rapid Fire.
2017-01-26 19:46:36 +01:00
FlatOutPS2 6e54dfe5ba LilyPad: Remove outdated hacks
Removes Ignore Key(hasn't functioned since LilyPad 0.9.9 (PCSX2 0.9.6)),
and "Send escape on window close" hack (unnecessary for PCSX2 and caused
issues with other emulators).
2017-01-26 19:46:36 +01:00
FlatOutPS2 9163ed351c LilyPad: Add Exclude Input option
This new option on the pad tabs disables an input so it will be ignored
when trying to bind another input. This is helpful when binding controls
for a device with an input that's difficult to center like an
accelerator, or just always active like a faulty button or analog stick.
2017-01-26 19:46:36 +01:00
FlatOutPS2 f8a79e5d40 LilyPad: Add neGcon support
Adds neGcon as a new pad type.

For use with several PS1 and PS2 games like the Ridge Racer and Ace
Combat series.
2017-01-26 19:46:19 +01:00
FlatOutPS2 947b6b5503 LilyPad: Add Device Select option
Adds a device select option that hides bindings and disables binding new
inputs from all non-selected devices on the bindings list. This also
avoids input conflict issues when one controller is recognized as
several devices through different APIs.
2016-12-10 12:16:44 +00:00
FlatOutPS2 872ab9d2b1 LilyPad: Add Configure on bind option
Part of the GUI update, this function switches to the configuration page
immediately after binding an input instead of staying on the bindings
page.
2016-12-10 12:16:44 +00:00
FlatOutPS2 1f8608f6dd LilyPad: GUI update
Updates the UI by reducing the height of the plugin window. This has
been achieved by removing some buttons below the diagnostics and
bindings list and incorporating those functions into the
lists(accessible by right-clicking in the list). The binding
configurations on the Pad tabs have been moved to a separate page, like
the Forcefeedback bindings, to separate the configuration from the
bindings.
2016-12-10 12:16:44 +00:00
FlatOutPS2 deaceb6b08 LilyPad: Add skip deadzone option
Adds a skip deadzone option to the Pad tabs.

With the normal deadzone, if the control input value is below the
deadzone threshold, the input is ignored.
However, some controllers also benefit from shortening the input range
by skipping a deadzone.
2016-12-10 12:16:44 +00:00
FlatOutPS2 8db9a27970 fix2 2016-11-14 13:55:55 +01:00
FlatOutPS2 d1788ac1e9 fix 2016-11-13 10:56:35 +01:00
FlatOutPS2 de8d3fb1eb LilyPad: Add PS mouse support
Adds Playstation Mouse as a new pad type.

For use with PS1 games only.
2016-11-13 01:23:59 +01:00
FlatOutPS2 a3478e02f4 LilyPad: Add tooltips (#1653)
Adds informational tooltips to several UI options.
2016-11-12 23:52:56 +00:00
FlatOutPS2 5d90afe648 LilyPad: Add separate bindings for each pad type (#1609)
Adds separate bindings for each of the pad types (DualShock2,
Guitar,Pop'n Music). This allows the user to change the button
configuration to better suit the Guitar and Pop'n Music pads without
messing up the bindings already setup for the DS2.

Close #1576.
2016-11-06 21:59:19 +00:00
Clang Format 604d3bac3c clang format: set SpacesBeforeTrailingComments to 1 2016-10-16 21:42:31 +02:00
Gregory Hainaut 4ebe739b44 pcsx2: remove various unused variable
Warning can be reenabled on GCC

A warning isn't fixed as potentially the code is wrong
../pcsx2/gui/MemoryCardFolder.cpp: In member function ‘void FolderMemoryCard::FlushFileEntries(u32, u32, const wxString&, MemoryCardFileMetadataReference*)’:
../pcsx2/gui/MemoryCardFolder.cpp:1027:10: warning: unused variable ‘filenameCleaned’ [-Wunused-variable]
     bool filenameCleaned = FileAccessHelper::CleanMemcardFilename( cleanName );
2016-09-10 00:09:05 +02:00
Clang Format d6ae5bfafa reformat lilypad
Note: I'm worried on the EXPORT/CALLBACK behavior on multiple OS
2016-09-08 21:54:49 +02:00
Akash dc874a99cd LilyPad: Remove useless self assignment
CID 146888 (#1 of 1): Self assignment (NO_EFFECT)self_assign: Assignment
operation (this->devices[i]->virtualControls + j).uid =
(this->devices[i]->virtualControls + j).uid has no effect.
2016-09-03 20:29:46 +05:30
Gregory Hainaut ac9f2ed284 lilypad: fix the gcc warning take 3
Signed vs non-signed comparison
2016-08-03 18:06:27 +02:00
Gregory Hainaut 4eda5fb924 Revert "lilypad: use size_t instead of int for num* variable"
This reverts commit 87d73684fa.

Will do something that work ;)

close #1498
2016-08-02 22:40:03 +02:00
Gregory Hainaut 87d73684fa lilypad: use size_t instead of int for num* variable
Fix noisy GCC warning:  warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2016-08-02 15:29:38 +02:00
Gregory Hainaut d714a2a393 lilypad: fix compilation on ICC 2016-07-28 10:46:40 +02:00
Jonathan Li e25e8bc580 plugins: Tidy/standardise VS projects
Combine all the different configurations together so the project files
are more generic and maintainable.

Also standardise the layout so all the project files will be similar and
all have the same standard elements (even if empty).

Add 64-bit configurations.

Additional specifics:
spu2-x: FLOAT_SAMPLES preprocessor definition removed since it's unused.
2016-07-19 23:25:12 +01:00
FlatOutPS2 896730ceda LilyPad: Fix regression in configure binding (#1426)
Fixes regression introduced by the pop'n music controller support PR.

When modifying the axis direction combo box in the Configure Binding
group, the modified binding's info would get deleted and replaced by the
next binding's info. This results in incorrect info being passed to
BindCommand().

This commit reverts the incorrect code so the binding info is backed up
before deletion takes place, therefore ensuring the correct info is
passed to BindCommand().
2016-06-21 22:54:52 +01:00
FlatOutPS2 ce8b9c153c LilyPad: Make D-pad buttons independent of each other (#1412)
Fixes games that require dance pad support (Dance Dance
revolution series).
2016-06-19 12:25:00 +01:00
FlatOutPS2 d736dc1a0a LilyPad PS1 analog mode fix
Fixes issue where "Use analog mode if possible - PS1 only" would enable
analog mode when playing games that don't support it.
2016-06-10 11:30:30 +02:00
FlatOutPS2 60ece1ee72 LilyPad UI improvement
The layout of the buttons is improved to more closely resemble a modern analog controller/DualShock configuration, and the Device column of the list view has been reduced slighty so by default the horizontal scroll bar isn't visible.
2016-06-10 11:30:18 +02:00
Jonathan Li 7c205d7a1e windows: Don't use __declspec(dllexport) for plugin exports
Using __declspec(dllexport) causes duplicate export warnings to be
generated when compiling 64-bit builds. Name mangling also occurs on
functions that are exported this way, so it doesn't actually work with
the plugin system, which uses unmangled names.

The module definition file exports the functions without name mangling
and is sufficient on its own.
2016-06-05 22:57:42 +01:00
Jonathan Li 292c6810ad lilypad: Fix missing call to HidD_GetHidGuid
I accidentally removed it in a previous commit. It probably didn't
affect anyone though (you'd need to be using a DS3 via libusb, most
people will be using other methods).
2016-06-05 20:04:17 +01:00
Jonathan Li b20433c0be windows: Remove user.props references from all projects
find . -name *.vcxproj -exec sed -i -e '/user.props/d' {} \;

Microsoft recommends against using .user files. From
https://msdn.microsoft.com/en-us/library/669zx6zc.aspx :
"The best practice is to delete the reference to them in Property
Manager to ensure that your projects operate independently of any
per-user, per-computer settings. This is important to ensure correct
behaviour in a SCC (source code control) environment."

If you cannot compile SPU2-X after this commit (since that still relies
on the old DirectX SDK), you'll need to fix your build environment.
2016-05-29 12:21:52 +01:00
Jonathan Li be7af60ab5 lilypad: Use Windows SDK headers for HID functions
Has been available since the switch to the Windows 8.1 SDK.
2016-05-28 23:30:28 +01:00
Jonathan Li f888aa61fb lilypad: Remove local volume control
Windows Vista onwards provides application specific volume controls, and
the local volume feature only interferes with it. Any volume adjusting
stuff probably belongs in SPU2-X.

Closes #629
2016-05-27 23:55:45 +01:00
Jonathan Li 2aeceafb36 lilypad:windows: Remove keyboard hooks code
The code wasn't used, and generally low level hooks should be avoided
since they affect the responsiveness of all applications. On Windows 7
and later, the hooks may also be silently removed if they timeout, which
could be possible under heavy load.
2016-05-27 23:40:31 +01:00
Jonathan Li 4f24d22a68 lilypad: Disable close hacks when loaded by PCSX2
The close hacks don't work with PCSX2 - the WM_CLOSE message can't
actually be triggered for the rendering window. The hacks were also
designed as a workaround for some PSX emulator close window bugs, which
don't affect us.
2016-05-27 00:36:11 +01:00
Jonathan Li e16b367e6e windows: Workaround weird LoadLibraryEx failures
For some reason some Windows 7 systems (most are unaffected) cannot cope
with LoadLibraryEx and return error code 87 - "The parameter is
incorrect".

Switch to using LoadLibrary instead for any case where Windows 7 is
expected to successfully load the requested dll. Potentially Windows
Vista is also affected.
2016-04-06 19:52:59 +01:00
Jonathan Li 02ea7d390c lilypad:windows: Switch to includes from Windows SDK 2016-03-17 23:58:19 +00:00
Jonathan Li 834652922a lilypad:windows:xinput: Only support 1.3 and 1.4
1.3 is used on Vista and 7, so we don't need earlier versions.
2016-03-17 23:58:18 +00:00
Jonathan Li 490cb757bf lilypad:windows: Clean up property mess
I probably should have used property sheets as well, but it's still a
good improvement. It does cut down quite a few 64-bit warnings.
2016-03-16 20:54:54 +00:00
Jonathan Li b516c1001a windows: Set _WIN32_WINNT to 0x0600 (Windows Vista) 2016-03-13 13:41:16 +00:00
Jonathan Li 9ed9b2d8cd windows: Switch to DefaultPlatformToolset aka non-XP toolsets
Basically I ran
find . -name "*.vcxproj" -exec sed -i -e 's/_xp//' {} \;

This will likely break XP, but it paves the way on Windows for a PCSX2
that does not require the DirectX redistributables to be installed for
Windows 8, 8.1 and 10 users. Windows Vista and 7 users will still require
the DirectX redistributable files for XInput and XAudio, though PCSX2
should still be capable of running if a user does not actually use either
of them.
2016-03-13 12:04:28 +00:00
Jonathan Li 85489d05e0 lilypad:windows: Set Unicode in project file instead
Also move the DirectInput define.
2016-02-25 23:36:11 +00:00
Jonathan Li 6fa7a8989c lilypad:windows: LoadLibrary is not required for Raw Input
It's been available since XP and it's not special like XInput (where we
might have SCP in the middle) so let's have the linker resolve the
functions at link time.
2016-02-25 23:36:11 +00:00
Jonathan Li fd8c762772 lilypad: Fix gcc strict-aliasing warning
The fixme I added was likely wrong. Not sure what I was thinking.
2016-02-25 23:36:11 +00:00