Commit graph

27 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
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
scribam
612d1f8d81
vita3k: cleanup (#3357)
* module: add missing pragma once

* cmake/vita3k: delete unused files

* vita3k: delete useless semi-colons

* vita3k: cleanup headers

* audio: add missing override to destructors

* vita3k: fix typos

* external: disable unused curl targets
2024-09-02 13:03:58 +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
scribam
34310c6087 vita3k: Prefer contains() instead of find() + end() 2023-09-14 13:05:23 +02:00
Pedro Montes Alcalde
1d26382eaa
net: Fix max epoll nfd number on wait (#2764) 2023-07-21 13:18:26 -03:00
Pedro Montes Alcalde
a4b0daa760
net: Some implement some rare net funcs 2023-07-19 19:11:12 -03:00
bookmist
a283a7a538 modules/SceNet: Stub SceNetResolverCreate with fake id. 2023-06-22 11:49:03 +02:00
bookmist
4ba2e086cc Vita3K: code cleanup and optimisations 2023-05-10 15:31:55 +03:00
Zangetsu38
019d96ef54 gui/manual: handle manual pages of different aspect ratios.
gui: move some push back to emplace back for init texture.
2023-05-01 13:24:47 +02:00
bookmist
6d4224155e net/types: fix compile error for msvc-clang 2023-04-18 00:31:28 +03:00
Pedro Montes Alcalde
68e46369f4
net/http: Some improvements 2023-04-13 16:08:20 -03:00
bookmist
40ee98e560 modules/SceNet: implement LLE libHttp and libSsl 2023-01-05 16:53:07 +03:00
Edwin Rijkee
cbe8558dd0 modules/SceNet: scenetEpoll* functions and sockopts 2023-01-04 17:33:58 +01:00
EXtremeExploit
41a17e79c7 Planet Earth Season 2023 2023-01-02 10:46:20 +01:00
edwinr
0df79bb8b2
net: Fix return value of sceNetSend/sceNetRecv (#2253)
* Fix handling of return value from socket functions

Successfull return values with positive return values were being translated to 0. This causes software to conclude that for example 0 bytes were sent/received or that the connection was closed.

* Fix forgotten to rename translate_errorcode in one location

* Directly pass return value from listen to translate_return_value
2022-12-28 15:00:34 +01:00
Pedro Montes Alcalde
e8151664b7
cmake: Treat format-secutiry warnings as errors (#1667) 2022-06-12 01:03:43 -03: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
scribam
4424ae596d SceNetCtl: Code refactoring 2021-05-24 03:36:42 +02:00
totlmstr
024b71285f mem: split mem.h 2021-04-12 17:32:23 +02:00
scribam
5e3a6eb982
Update submodules + minor changes (#1137)
* cmake: Add NOMINMAX globally to avoid Windows compilation issues with std::min/std::max

* main/net: add missing include files

* rtc: Remove convert_filetime/convert_timespec functions as they have been replaced with _wstat/stat

* external: Update better-enums to tag "0.11.3"

* external: Update CLI11 to tag "v1.9.1"

* external: Update elfio to tag "Release_3.8"

* external: Update glad to tag "0.1.34"

* external: Update googletest to tag "release-1.10.0"

* external: Update imgui to tag "v1.80"

* external: Update imgui_club

* external: Update miniz to tag "2.1.0"

* external: Update pugixml to tag "v1.11.4"

* external: Update spdlog to tag "v1.8.2"

* external: Update stb

* external: Update yaml-cpp to tag "yaml-cpp-0.6.3"

* external: Switch to vitasdk/vita-toolchain

* external: Refactor xxHash integration
2021-02-09 21:49:54 +01:00
Sunho Kim
f4bd57f1d4 net: socket abstraction & stub udpp2p socket 2020-07-14 15:22:34 +09: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