Commit Graph

27 Commits

Author SHA1 Message Date
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
Macdu
59ac163fc0
display: Add FPS hack (#3189) 2024-01-20 12:28:51 +01:00
Pedro Montes Alcalde
34565e3ef4
Vita2024K: Happy 2024 2024-01-01 12:36:32 -03:00
Macdu
f49ef10e50 modules/SceGxm, display, renderer: Implement frame prediction 2023-11-16 11:28:36 +01:00
Macdu
ca39e6dffc display: Limit the refresh rate of the UI/common dialog 2023-11-08 22:43:18 +01:00
Macdu
a3f6cfdf7f motion: Add motion support 2023-09-02 05:04:02 +02:00
Zangetsu38
39bfd76424 vita3k: implement Pause/resume app. 2023-05-06 22:49:48 +02:00
Macdu
e9969a11ce display: Always refresh screen if a dialog is being shown 2023-05-04 07:33:31 +02:00
Macdu
73e28e63c1 display: Fix regression with VBlank callbacks 2023-02-15 13:35:17 +01:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00
Macdu
0bc9ef9ee7 display, renderer: Sync guest and host fps 2022-10-24 23:27:15 +02: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
Macdu
1002fa560e modules/SceGxm, renderer: Process everything in the main thread and make gxm functions not blocking 2022-06-24 13:57:12 +02:00
Pedro Montes Alcalde
e8151664b7
cmake: Treat format-secutiry warnings as errors (#1667) 2022-06-12 01:03:43 -03:00
Macdu
647e254265 touch: Improve accuracy of SceTouch functions. 2022-06-11 23:20:48 +02:00
Macdu
5da4043956 display: Use proper thread functions when waiting for vblank 2022-06-01 19:59:11 +02:00
Macdu
1cf2ef303b display: Start vsync thread during boot 2022-05-30 01:17:42 +02:00
Macdu
e9df46ed7a display: more accurate vblank delays 2022-05-10 13:37:43 +02:00
Macdu
bd7c6e7ff7 SceDisplay: proper implementation of _sceDisplaySetFrameBuf 2022-05-09 14:59:42 +02:00
Macdu
6982791a25 display: fix sceDisplayWaitSetFrameBuf 2022-05-07 01:34:05 +02:00
Macdu
cff586cd60 SceDisplay: implement proper behavior of sceDisplayWait...Multi 2022-05-05 01:23:29 +02:00
Macdu
652957eeee display: proper behavior of sceDisplayGetVcount + fix race conditions 2022-05-05 01:23:29 +02:00
pent0
56876adade display: Fix display waits not processing all waits. 2022-04-29 01:28:16 +02:00
Zangetsu38
fb8a6ed618 display: fix vblank count in vblank_sync_thread. 2022-04-07 16:38:26 +02:00
Zangetsu38
f298f955c1 modules/SceDisplay: Implement (Un)RegisterVblankStartCallback.
- add support of cb vblank function.

Co-authored-by: bookmist <roshst@yandex.ru>
2022-04-04 14:37:12 +02:00
pent0
c85b005db7 display: Attempt emulate vsync instead of relying on main thread. 2022-02-25 14:55:11 +01:00