Commit graph

129 commits

Author SHA1 Message Date
Vitor K
34de77d429
Various miscelaneous changes (#6496) 2023-05-03 17:24:10 +02:00
SachinVin
41f13456c0
Chore: Enable warnings as errors on MSVC (#6456)
* tests: add Sanity test for SplitFilename83

fix test

fix test

* disable `C4715:not all control paths return a value` for nihstro includes

nihstro: no warn

* Chore: Enable warnings as errors on msvc + fix warnings

fixes

some more warnings

clang-format

* more fixes

* Externals: Add target_compile_options `/W0` nihstro-headers and ...

Revert "disable `C4715:not all control paths return a value` for nihstro includes"
This reverts commit 606d79b55d.

* src\citra\config.cpp: ReadSetting: simplify type casting

* settings.cpp: Get*Name: remove superflous logs
2023-05-01 22:38:58 +03:00
Steveice10
78cb48b23c
common: Make TrimSourcePath constexpr (#6279) 2023-02-03 19:01:10 +01:00
PabloMK7
016ce6c286
Add 3GX plugin loader (#6172)
* Initial plugin loader support

* More plugin loader progress

* Organize code and more plugin features

* Fix clang-format

* Fix compilation and add android gui

* Fix clang-format

* Fix macos build

* Fix copy-paste bug and clang-format

* More merge fixes

* Make suggestions

* Move global variable to static member

* Fix typo

* Apply suggestions

* Proper initialization order

* Allocate plugin memory from SYSTEM instead of APPLICATION

* Do not mark free pages as RWX

* Fix plugins in old 3DS mode.

* Implement KernelSetState and notif 0x203

* Apply changes

* Remove unused variable

* Fix dynarmic commit

* Sublicense files with MIT License

* Remove non-ascii characters from license
2022-12-11 10:08:58 +02:00
GPUCode
cbd5d1c15c
Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115) 2022-09-21 18:36:12 +02:00
SachinVin
9ad6bc29b5 common/logging: Create a new backed for android's logcat
logging
2021-10-02 16:38:18 +05:30
bunnei
4cc8d43fa1 android: log: TrimSourcePath: Cannot be constexpr. 2021-09-29 22:51:14 +05:30
James Rowe
9f4501aceb Perf: Remove more breakpoint checking in the interpreter. Move filtering earlier in the logging chain 2021-07-24 23:36:56 +05:30
xperia64
c1d7ba4d60
Delete the old log file before rotating (#5675) 2021-01-03 14:53:23 -05:00
bunnei
9c76120a13
Fix the old log file to work with the log parser. 2021-01-01 03:17:20 -08:00
xperia64
b4a6763484 Rotate previous log file to '.old' if it exists 2020-12-31 16:10:01 -05:00
Valentin Vanelslande
41abdb505c
common/logging/log: Add LLE in Audio_DSP comment (#5327)
@wwylele forgot to add it in https://github.com/citra-emu/citra/pull/4490.
2020-05-04 12:20:56 +02:00
BreadFish64
e7a073e15f logging/backend: Change type of filename from string to const char*
This was suggested by degasus in https://github.com/yuzu-emu/yuzu/pull/3326 in order to avoid an unnecessary copy.
2020-01-28 14:29:26 +01:00
BreadFish64
b3beff0f4c common/logging: don't use regex for path trimming 2019-12-24 14:19:18 -06:00
ReinUsesLisp
30be149f87 common/logging: Silence no return value warnings 2019-11-19 16:47:35 +01:00
bunnei
1c61f066d1 android: common: logging: Add log output support. 2019-07-07 11:01:13 -04:00
Pengfei Zhu
37861526ff
Merge pull request #4733 from zhaowenlan1779/ps
service/ps: Implement PS:EncryptDecryptAes
2019-04-29 21:39:53 +08:00
zhupengfei
b34847d59e
service/ps: Implement PS:EncryptDecryptAES 2019-04-15 22:56:55 +08:00
Weiyi Wang
4a206237be
Merge pull request #4726 from FearlessTobi/port-2312
Port yuzu-emu/yuzu#2312: "general: Use deducation guides for std::lock_guard and std::unique_lock"
2019-04-13 18:00:09 -04:00
Lioncash
21c71d21ae general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
Lioncash
592ec9b084 logging/backend: Make time_origin a class variable instead of a local static
Moves local global state into the Impl class itself and initializes it
at the creation of the instance instead of in the function.

This makes it nicer for weakly-ordered architectures, given the
CreateEntry() class won't need to have atomic loads executed for each
individual call to the CreateEntry class.
2019-03-17 23:17:57 +01:00
Lioncash
235fc348af logging/backend: Move CreateEntry into the Impl class
This function is only ever used within this source file and makes it
easier to remove static state in the following change.
2019-03-17 23:17:57 +01:00
BreadFish64
36e368ff99 remove Common::TrimSourcePath
wwylele / 白疾風Today at 6:14 PM
I doubt the performance of constructing regex everytime the function is called
Is TrimSourcePath only called by logging? if so, you can move the implementation into logging, and cache the regex object into global
This function is probably too specific to be in common anyway
2019-03-10 19:18:09 -05:00
BreadFish64
f767b5fdef android: add logging 2019-03-09 18:23:32 -06:00
Carl Kenner
3d083859c1 logging: Add DebuggerBackend for logging to Visual Studio 2018-12-01 12:54:17 +01:00
Ben
b90ff739a0 Add CheatEngine and support for Gateway cheats (#4406)
* Add CheatEngine; Add support for Gateway cheats; Add Cheat UI

* fix a potential crash on some systems

* fix substr with negative length

* Add Joker to the NonOp comp handling

* Fixup JokerOp

* minor fixup in patchop; add todo for nested loops

* Add comment for PadState member variable in HID

* fix: stol to stoul in parsing cheat file

* fix misplaced parsing of values; fix patchop code

* add missing break

* Make read_func and write_func a template parameter
2018-11-16 18:01:10 -07:00
Weiyi Wang
18caa787d2
Merge pull request #4197 from B3n30/spsc_queue_wait
threadsafe_queue: Add PopWait and use it where possible
2018-10-19 19:36:37 -04:00
B3n30
ad8b9c0429 Adressed review comments 2018-10-08 23:28:54 +02:00
Lioncash
cd7596e67e text_formatter: Avoid unnecessary string temporary creation in PrintMessage()
operator+ for std::string creates an entirely new string, which is kind
of unnecessary here if we just want to append a null terminator to the
existing one.

Reduces the total amount of potential allocations that need to be done
in the logging path.
2018-10-06 16:46:02 +02:00
B3n30
9b49a79a72 threadsafe_queue: Add WaitIfEmpty and use it in logging 2018-10-05 11:09:38 +02:00
Lioncash
1cf3ef15b9 common/logging: Amend documentation comments
Multi-line doc comments still need the '<' after the ///, otherwise it's
treated as a regular comment and makes the original doc comment broken
in viewers, IDEs, etc. While we're at it, also fix some typos in the
comments.
2018-09-21 16:26:21 +02:00
Lioncash
83c32b8d22 common/logging/filter: Replace C-style case with C++ static_cast 2018-09-15 15:43:00 +02:00
Lioncash
787fff9a64 common/logging/filter: Make constructor explicit
Implicit conversions aren't desirable here.
2018-09-15 15:41:51 +02:00
EverOddish
04dd91be82 Initial support for scripting (#4016)
* Add ZeroMQ external submodule

* ZeroMQ libzmq building on macOS

* Added RPC namespace, settings and logging

* Added request queue handling and new classes

* Add C++ interface to ZeroMQ

* Added start of ZeroMQ RPC Server implementation.

* Request construction and callback request handling

* Read and write memory implementation

* Add ID to request format and send reply

* Add RPC setting to macOS UI

* Fixed initialization order bug and added exception handling

* Working read-write through Python

* Update CMakeLists for libzmq to resolve target name conflict on Windows

* Platform-specific CMake definitions for Windows/non-Windows

* Add comments

* Revert "Add RPC setting to macOS UI"

* Always run RPC server instead of configurable

* Add Python scripting example. Updated .gitignore

* Rename member variables to remove trailing underscore

* Finally got libzmq external project building on macOS

* Add missing dependency during libzmq build

* Adding more missing dependencies [skip ci]

* Only build what is required from libzmq

* Extra length checks on client input

* Call InvalidateCacheRange after memory write

* Revert MinGW change. Fix clang-format. Improve error handling in request/reply. Allow any length of data read/write in Python.

* Re-organized RPC static global state into a proper class. [skip ci]

* Make sure libzmq always builds in Release mode

* Renamed Request to Packet since Request and Reply are the same thing

* Moved request fulfillment out of Packet and into RPCServer

* Change request thread from sleep to condition variable

* Remove non-blocking polling from ZMQ server code. Receive now blocks and terminates properly without sleeping. This change significantly improves script speed.

* Move scripting files to dist/ instead of src/

* C++ code review changes for jroweboy [skip ci]

* Python code review changes for jroweboy [skip ci]

* Add docstrings and tests to citra.py [skip ci]

* Add host OS check for libzmq build

* Revert "Add host OS check for libzmq build"

* Fixed a hang when emulation is stopped and restarted due to improper destruction order of ZMQ objects [skip ci]

* Add scripting directory to archive packaging [skip ci]

* Specify C/CXX compiler variables on MinGW build

* Only specify compiler on Linux mingw

* Use gcc and g++ on Windows mingw

* Specify generator for mingw

* Don't specify toolchain on windows mingw

* Changed citra.py to support Python 3 instead of Python 2

* Fix bug where RPC wouldn't restart after Stop/Start emulation

* Added copyright to headers and reorganized includes and forward declarations
2018-09-11 22:00:12 +02:00
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
Lioncash
8fbfd0f7fa logging/backend: Use const reference to refer to log filter
The filter is returned via const reference, so this was making a
pointless copy of the entire filter every time a message was being
pushed into the logger instance.
2018-08-31 00:13:15 +02:00
BreadFish64
aa4b71d0ce update fmt to latest stable release
5.1.0
fixes a multitude of errors on MSVC
2018-08-01 14:10:24 -05:00
Lioncash
1affca05c7 logging/filter: Use std::string_view in ParseFilterString()
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.

We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
2018-07-30 14:56:53 +08:00
Lioncash
798ebda049 logging/backend: Add missing standard includes
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
2018-07-30 14:56:52 +08:00
Lioncash
765c7e711a logging/backend: Use std::string_view in RemoveBackend() and GetBackend()
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
2018-07-30 14:56:51 +08:00
zhupengfei
18664c719e
frontend/applets: misc fixes
* Renamed applet to applets

* Added log classes Applet and Applet.SWKBD

* Fixes to get it compile
2018-06-30 08:01:49 +08:00
wwylele
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
wwylele
fde415968e log: remove deprecated log macros 2018-06-29 14:02:29 +03:00
NarcolepticK
f831a08224 logging: Added NGLOG_GENERIC (needed for vm_manager) 2018-06-22 18:48:25 -04:00
James
29551c187a Add missing std::string import in text_formatter 2018-05-19 21:31:09 +10:00
Daniel Lim Wee Soong
51398e0301 Logging: Add customizable logging backends and fmtlib based macros
* Change the logging backend to support multiple sinks through the
Backend Interface
* Add a new set of logging macros to use fmtlib instead.
* Qt: Compile as GUI application on windows to make the console hidden by
default. Add filter configuration and a button to open log location.
* SDL: Migrate to the new logging macros
2018-04-23 21:32:56 -06:00
Weiyi Wang
a9544ca015
Merge pull request #3580 from daniellimws/common-fmt
common: Migrate logging macros
2018-04-06 12:38:08 +03:00
James Rowe
501717e9db Update fmtlib to fix msvc warnings
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
2018-04-05 22:33:12 -06:00
Daniel Lim Wee Soong
111da6db06 common: Migrate logging macros
Follow-up of #3533

Replace logging to use NGLOG instead of LOG

This is significantly larger than the previous ones.
2018-03-25 18:42:50 +08:00