Commit graph

25 commits

Author SHA1 Message Date
Pedro Montes Alcalde
4a14d546ba
Tick Tick Tick, thats the sound of 2024 flying by (#3503) 2025-01-19 18:51:43 -03:00
Saturnsky
c8e621f328
gui/controllers: align controller assignment behavior with Vita TV (#3447)
* gui/controllers: align controller assignment behavior with Vita TV

* controllers: separate port indexing between sceCtrl and SDL_GameController logic

* controllers: handle null controller and name during initialization
2025-01-01 23:57:53 +01:00
oltolm
c61895e6f4
vita3k: Add support for mingw-w64 (#3406)
* make the code compile on mingw-w64

* make compile with Clang 19

* make compile with GCC
2024-10-26 23:41:51 +02:00
scribam
77abeaa167
vita3k: More cleanup (#3379)
* vita3k: Use C++17 nested namespace definition

* vita3k: Remove redundant call to c_str()

* vita3k: Prefer C++ header

* vita3k: Use structured bindings

* shader: Add explicit fallthrough

* vita3k: Cleanup headers and dependencies

* util: Add WIN32_LEAN_AND_MEAN before <Windows.h>

* modules: Remove redundant 'const' specifier on a constexpr variable

* modules: Remove redundant return statement at the end of a function with a void return type

* clang-format: Use C++20 standard

* vita3k: Insert new line at EOF

* host: rename filesystem.hpp to filesystem.h
2024-09-18 21:48:08 +02:00
nishinji
541631822c gui: some small improvements
- Add option to disable motion
- Add jpeg format support for screenshots
2024-08-08 18:45:55 +02:00
bookmist
1fda880a94 vita3k: big code cleanup
Improvements
* lang: a bit more verbose error on wrong lang xml

Bugfixes
* kernel/sync_primitives: fix theoretically possible AV
* modules/SceAudio: a bit more correct sceAudioOutSetConfig
* fix wrong objects initialisation ({0} -> {})

Warning fixes
* clang warning: Macro argument should be enclosed in parentheses
[bugprone-macro-parentheses]
* modules: set unsigned type for Sce*ErrorCode enums
* clang warning: variable might be not be initialized
* clang warning: Function returns by const value. Consider returning by non-const value instead.
* clang warning: Prefer transparent functors [modernize-use-transparent-functors]

Refactoring
* io/device: move functions implementation from .h to .cpp file
* vita3k: fix fs::path usage
* clang warning: 'if' statement is unnecessary; deleting null pointer has no effect
* vita3k: use structured bindings and references in for-each-loops
* vita3k: simplify container operations, extract frequent operations to utility functions
* clang⚠️ 'contains' member function can be used
* kernel/sync_primitives: refactoring. drop unused parameter of handle_timeout
* vita3k: drop unused function parameters

* vita3k: fix typecasts
use static_cast instead of reinterpret casts if possible
use correct constants (1/1.0/1.0f)
correct variable types to minimise typecasts
use explicit typecasts (not everywhere)
replace c-style typecasts to c++ style typecasts (not everywhere)
* clang warning: remove redundant typecasts
* clang warning: Cast drops const qualifier

Optimisation
* vita3k: remove unused includes
* clang warning: Constness of returning variable prevents automatic move
[performance-no-automatic-move]
* clang warning: String concatenation results in allocation of unnecessary temporary strings
[performance-inefficient-string-concatenation]
* vita3k: use std::move
* vita3k: optimization. push_back -> emplace_back
* vita3k: fix datatypes to avoid unnesessary conversions
* clang warning: remove unneeded string->c_str->string conversion
* clang warning: The parameter is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
* clang warning: 'find' called with a string literal consisting of a single character
[performance-faster-string-find]
* clang warning: Result of a postfix operator is discarded, consider replacing it with a prefix operator
* clang warning: Pass value parameters by const reference

Code cleanup
* io/io: remove once used variables
* net/posixsocket: remove struct keyword
* vita3k: use raw string literals to avoid excessive escaping
* vita3k: refactoring. replace Ptr<> to pointer in Sce functions
* vita3k: drop unused variables and incorrect comments
* clang warning: readability-inconsistent-declaration-parameter-name
* clang warning: Extra ';' after member function definition
* clang warning: Possible misuse of comma operator (, is used instead of ;)
* clang warning: Algorithm accepting an iterator and a count can be used
* clang warning: Declaration and assignment can be joined
* clang warning: Type trait can be simplified using a template alias or a variable template

* vita3k: cleanup class methods
remove unimplemented (and obviously not used) methods
move deleted methods to public
change empty body to =default
remove auto constructors
set member default values
2024-03-18 15:44:56 +03:00
Pedro Montes Alcalde
34565e3ef4
Vita2024K: Happy 2024 2024-01-01 12:36:32 -03:00
Zangetsu38
0f5c58a9af gui/controllers dialog: Add custom LED color support.
- Add checkbox for enable custom color.
- Fix End() pos.
2023-09-18 15:09:12 +02:00
scribam
34310c6087 vita3k: Prefer contains() instead of find() + end() 2023-09-14 13:05:23 +02:00
Zangetsu38
4c775f69c3 ctrl: Improve controller bindings.
- Fix navigate in ui with controllers.
- Add motion support string of french language.
- Add ext remap button support of controllers.
- Add press any key of keyboard for cancel remap.
- Add mapped button name from type of gamepad.
- Add reset controller binding button.
- fix typo of rebind_controls for lang.
2023-09-13 23:11:00 +02:00
Dzmitry Dubrova
290051ff7b ctrl: Implement controller remapping
Co-authored-by: nn9dev <39563889+nn9dev@users.noreply.github.com>
2023-09-02 12:38:08 +02:00
Macdu
a3f6cfdf7f motion: Add motion support 2023-09-02 05:04:02 +02:00
Zangetsu38
816af374bf ctrl: Fix scrolling alone in game when any common dialog is open. 2023-07-14 13:51:47 +02:00
Zangetsu38
8d345f0021 gui/home screen: Allow browse in apps list with kb/controller.
- keep respect aspect ratio.
gui/live area: Allow browse live area with kb/controller.
- Allow using PS in controller for pause/resume game.
- refactor close system app.
- And lot more refactor/fix.
gui/manual: Allow browse in the page with kb/controler.
- Little refactor slider style of browse pages.
gui/user_management: Allow browse with kb/controler.
2023-06-15 00:35:51 +02:00
Macdu
7020158328 ctrl: Improve accuracy of controller functions 2023-05-09 06:15:53 +02:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00
Macdu
2eefc9751e vita3k: Remove unnecessary dependencies between librairies and files 2022-07-28 12:24:06 +02:00
hobyst
1169da50bc host: Rename host to emuenv
This commit renames the host library as emuenv (emulated PS Vita
environment) to avoid confusion with the future host OS abstraction
layer
2022-07-03 14:31:24 +02:00
Zangetsu38
53f72777a4 external: update sdl to 2.0.18.
- ctrl: move get_type_of_controller from name to type get.

Co-authored-by: qurious-pixel <62252937+qurious-pixel@users.noreply.github.com>
2021-12-17 18:20:33 +01:00
Zangetsu38
16dbbd9349 modules/(SceCtrl/SceTouch): fix and refactor
- add controllers connected in log when app boot.
- add correct struct of both SceCtrlData(2)
- set touch mode in good place.
- refactor refresh controllers.
- implement sceCtrlGetWirelessControllerInfo.
- using DS4 type when is DS4/Dual Sense.
2021-11-04 19:18:44 +01:00
hobyst
168dfb19ca Add license notice on source files which didn't have one
- Also updated the copyright notice year on all files to 2021
2021-08-19 23:14:27 +02:00
Zangetsu38
32e763c5f9 modules/SceCtrl: Use SDL_GameControllerRumble for sceCtrlSetActuator.
- fix rumble on xinput and add rumble support for DS4 and DS.

Co-authored-by: german77 <juangerman-13@hotmail.com>
2021-07-18 22:38:18 +02:00
totlmstr
4e20885f89 Vita3K: run clang-format 2020-04-07 16:48:08 -04:00
1whatleytay
34a02553c4
vita3k: remove vita-headers (#649) 2020-02-06 09:44:49 -05:00
Nicolas Jallamion
06299de242 emulator: Refactor file structure (#557)
Also:
- external: update some submodules.
2019-08-28 16:52:07 +03:00