Commit Graph

31 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
bookmist
6ce9b6598e vita3k: some minor bugfixes
kernel/thread: fix possible crash in log_stack_traceback
modules/SceLibKernel: more correct sceClibSnprintf
kernel/load_self: fix possible crash on incorrect library modules. load process params from first loaded module (eboot.bin) only
modules/SceGxm: fix crash if display_thread not found
kernel/debugger: remove direct access to mem.memory to support memory mapping more complete
vita3k: remove direct access to kernel.threads (it's not thread-safe)
vita3k: implement and fix virtual destructors for class hierarchies to prevent memory leaks (except screen_filters)
clang-tidy warning: Constructing string from nullptr is undefined behaviour
clang warning: use after std::move
2024-02-12 20:21:40 +03:00
nishinji
d8b8e069d1
vita3k: typo fixes (#3179) 2024-01-18 11:49:08 +01:00
Pedro Montes Alcalde
34565e3ef4
Vita2024K: Happy 2024 2024-01-01 12:36:32 -03:00
scribam
df2ffeb48e
external: Update submodules (#2926)
* external: Update CLI11 to version v2.3.2

* external: Update MoltenVK to 1.2.5

* external: Update SPIRV-Cross to sdk-1.3.261.1

* external: Update Vulkan-Headers to v1.3.261

* external: Update capstone to 5.0.1

* external: Update cubeb

* external: Update dirent to 1.24

* external: Update fmt to 10.1.1

* external: Update glad to 2.0.4

* external: Update glslang to sdk-1.3.261.1

* external: Update googletest to v1.14.0

* external: Update imgui to version v1.89.9

* external: Update imgui_club

* external: Update miniz to version 3.0.2

* external: Update nativefiledialog-extended to version v1.1.0

* external: Update openssl to 3.1.2

* external: Update pugixml to version v1.13

* external: Update spdlog to v1.12.0

* external: Update stb

* external: Update tracy to v0.9.1

* external: Update vita-toolchain

* external: Update xxHash to v0.8.2

* external: Update yaml-cpp to version 0.8.0
2023-09-16 13:42:44 +02:00
scribam
34310c6087 vita3k: Prefer contains() instead of find() + end() 2023-09-14 13:05:23 +02:00
Macdu
5cb4c46c17 kernel: Fix thread start/end callbacks and cleanup 2023-07-26 19:55:09 +02:00
CoffeeBrewer64
75a6bf0d86
Typo fixes #2475 2023-04-06 23:04:05 +02:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00
bookmist
8edd333400 Fix compiler warnings 2022-11-16 21:39:55 +03: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
Pedro Montes Alcalde
e8151664b7
cmake: Treat format-secutiry warnings as errors (#1667) 2022-06-12 01:03:43 -03:00
Macdu
b1427a4612 kernel: Make ThreadState resume thread safe 2022-04-28 02:00:29 +02:00
bookmist
d2d9097d9c gdbstub: fix some warnings 2022-03-17 06:16:05 +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
sunho
ceeaae9d9a mem: Support windows write protect
mem: Properly decommit memory in windows
renderer: Add write protect based texture dirty flag
mem: Use custom allocator and optimized page table
dynarmic_cpu: Don't use page_table
2021-05-31 11:00:42 +02:00
sunho
1a9aab4d44 kernel: ThreadState constructor 2021-05-27 01:56:07 +09:00
sunho
d2e676c970 kernel: Add stack traceback 2021-05-24 03:36:52 +02:00
sunho
c6790fa021 kernel: Merge thread state and functions & fix gdb 2021-05-22 21:12:11 +02:00
sunho
7d6d79c399 kernel: Merge state and functions 2021-05-19 11:36:18 +09:00
sunho
d5f4b954fc kerenl: Implement trampoline injection
kernel: Move debugging helpers to one place
2021-05-19 11:36:18 +09:00
sunho
df4a6be4bd gdb: Update current thread properly 2021-04-25 23:55:38 +02:00
sunho
193b518b31 gdb: Thread safety 2021-04-25 23:55:38 +02:00
sunho
b5cabb87d9 gdb: Faster stepping / Fix resuming / Dont touch properly waiting threads 2021-04-25 23:55:38 +02:00
sunho
05cbb938cc gdb: Toggle gdbstub with config file 2021-04-25 05:56:02 +02:00
sunho
7c8446ab59 gdb: Stop the world on breakpoint 2021-04-25 05:56:02 +02:00
sunho
7b925e7183 gdb: Fix thread info 2021-04-25 05:56:02 +02:00
totlmstr
024b71285f mem: split mem.h 2021-04-12 17:32:23 +02:00
Sunho Kim
177ce20d53
cpu: improve gdb and add code injection (#737) 2020-06-09 09:38:41 +02:00
Nicolas Jallamion
06299de242 emulator: Refactor file structure (#557)
Also:
- external: update some submodules.
2019-08-28 16:52:07 +03:00