Commit graph

9643 commits

Author SHA1 Message Date
yzct12345
3641b9891d logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2023-06-30 12:15:51 +03:00
Morph
8e8ca7d9d0 common: logging: backend: Close the file after exceeding the write limit
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
2023-06-30 12:15:51 +03:00
Morph
b57773b1cf common: logging: Restructure backend code 2023-06-30 12:15:51 +03:00
Morph
b559c078bc common: logging: backend: Wrap IOFile in a unique_ptr
Allows us to forward declare FileUtil::IOFile.
2023-06-30 12:15:51 +03:00
Lioncash
5c86147ef4 log/backend: Use in-class initializer for FileBackend
We can also avoid redundant constructions of the same string repeatedly.
2023-06-30 12:15:51 +03:00
Lioncash
399f3d4e32 log/backend: Make use of erase_if
Same behavior, but less verbose.
2023-06-30 12:15:51 +03:00
Lioncash
173b84c8ff log/backend: Correct order of const in copy constructor
Follows our predominant coding style. Also explicitly specifies the move
constructor/assignment operator as well.
2023-06-30 12:15:51 +03:00
Lioncash
b4c38372d1 common/log: Move Log namespace into the Common namespace
Forgot to move this over when I moved the rest of the source files with
lacking namespaces over.
2023-06-30 12:15:51 +03:00
Lioncash
4fd0cbebdb logging/backend: Make use of designated initializers
Same behavior, less code.
2023-06-30 12:15:36 +03:00
GPUCode
ca2d87e5e3
renderer_opengl: Add debug scopes to logging (#6650) 2023-06-30 02:16:54 +03:00
Steveice10
d26dcc8e31
ci: Run clang-format and transifex in linux-fresh image. (#6649)
* ci: Run clang-format and transifex in linux-fresh image.

* build: Only add bundle targets for enabled outputs.
2023-06-29 00:44:13 -07:00
esliwka
0d516f6da5
frontend: Added Hybrid Screen screen layout option (#4542) (#6600)
Signed-off-by: elim <e_sliwka@tuta.io>
2023-06-29 01:42:57 +03:00
Steveice10
2d6aca4563
build: Rework CI and move all bundling into new build target. (#6556)
* build: Rework CI and move all bundling into new build target.

* ci: Use "mingw" in msys2 release names for compatibility.

* ci: Use "osx" in macOS release names for compatibility.

* ci: Disable macOS upload.

Will be moved to a separate PR for canary merge.
2023-06-26 17:42:00 -07:00
GPUCode
2e479fcec5
renderer_vulkan: Add shader generators (#6630) 2023-06-26 16:22:51 +02:00
GPUCode
7edc86a9bc
code: Remove outdated comment style (#6640) 2023-06-25 15:22:41 +05:30
GPUCode
9b82de6b24
Refactor software renderer (#6621) 2023-06-24 00:59:18 +02:00
sakuramipha
7198243319
android: Update UI strings to reflect desktop counterpart (#6608)
* android: Update UI strings to reflect desktop counterpart

Quick edit to the UI strings to bring the text up to parity with Citra desktop, plus some small QoL changes.

* Update strings.xml
2023-06-23 23:45:49 +01:00
GPUCode
6b8a06e7b4
gl_rasterizer: Reset normal map flag each draw (#6636)
* Fixes normal maps leaking draws
2023-06-24 00:30:16 +03:00
sakuramipha
eb118b2a4c
Merge pull request #6613 from t895/buncha-adjustments
citra_android: String adjustments
2023-06-23 15:35:54 +01:00
GPUCode
7616496456
video_core: Add debug scopes (#6634) 2023-06-23 03:37:13 +02:00
Steveice10
89663e0db8
build: Fix generating build info using unified source archive. (#6628) 2023-06-20 09:44:20 -07:00
Tobias
d8db0af1b2
Port yuzu-emu/yuzu#10575: "issue_template: Add link to website, Getting Log Files" (#6629)
Co-authored-by: bm01 <1279721+bm01@users.noreply.github.com>
2023-06-20 15:24:04 +02:00
luc-git
08970e7ba0
update graphics api button indicator (#6625)
* update graphics api button indicator

This tiny pull request
* update the graphics button indicator when launching or closing a game (graphics button doesn't update with per game configuration)

* Disable graphics button indicator click while in game

* fix crash

* It fixed crash when opening configure dialog in game if the graphics api for the game is different of the global graphics api
2023-06-20 15:27:36 +03:00
GPUCode
d735f5c458
renderer_vulkan: Add vulkan initialization code (#6620)
* common: Move dynamic library to common

* This is so that video_core can use it

* logging: Add vulkan log target

* common: Allow defered library loading

* Also add some comments to the functions

* renderer_vulkan: Add vulkan initialization code

* renderer_vulkan: Address feedback
2023-06-20 15:24:24 +03:00
Steveice10
70225e92f7
externals: Move library headers CMake logic to Citra. (#6627) 2023-06-19 17:08:11 -07:00
Steveice10
bfb6a5b5de
common: Add C++ version of Apple authorization logic. (#6616) 2023-06-19 15:50:26 -07:00
Steveice10
03dbdfc12f
video_core: Reduce nihstro includes in headers. (#6626) 2023-06-19 15:49:22 -07:00
GPUCode
3faddd5e03
video_core: Add vulkan shaders (#6619) 2023-06-19 17:02:18 +03:00
TGP17
7c11b9b689
Remove AppImage Themeing (#6618) 2023-06-18 10:24:11 -07:00
SachinVin
35d1b67fd4
Merge pull request #6602 from SachinVin/wall
Chore: enable `-Werror` on GCC and clang
2023-06-18 22:37:39 +05:30
SachinVin
4c8a98a321
common\string_util.cpp: switch to boost::locale::conv for UTF16ToUTF8() and UTF8ToUTF16() (#6623) 2023-06-18 20:00:00 +03:00
SachinVin
982c60c67c common\dynamic_library\ffmpeg.{cpp, h}: fix version check for av_opt_child_class_iterate 2023-06-17 21:24:20 +05:30
SachinVin
7e134421d5 common, input_common, network: fix warnings 2023-06-17 21:24:20 +05:30
SachinVin
946a32d793 android + common: fix warnings 2023-06-17 21:24:20 +05:30
SachinVin
8eb89c260d core: fix warnings 2023-06-17 21:23:58 +05:30
SachinVin
796e8a9f24 video_core:fix warnings 2023-06-17 21:23:58 +05:30
SachinVin
c66594caf8 Enable warnings as errors
cpp-jwt: supress OpenSSL deprecation warnings
2023-06-17 21:23:58 +05:30
SachinVin
06db4ffb17
Merge pull request #6508 from SachinVin/not-the-cia
Android: Offload CIA installation to background thread
2023-06-17 20:44:20 +05:30
Steveice10
7f1ffa2a04
hle: Reduce Y2R stub warnings to debug logs. (#6617) 2023-06-17 01:03:37 -07:00
Steveice10
38435e9b3e
Dynamically load FFmpeg and libfdk-aac if available. (#6570) 2023-06-17 02:06:18 +03:00
Rokkubro
d807cdfe62
Qt: Fix intermittent crash on exit (#6612)
* Fix null pointer deref on exit

* Fix from review
2023-06-16 22:28:00 +05:30
SachinVin
318d55252f CiaInstallWorker.java: cleanup magic numbers 2023-06-16 22:23:34 +05:30
Charles Lombardo
4d666b88b7 citra_android: Add headers for clock and plugin loader 2023-06-15 03:35:30 -04:00
Charles Lombardo
819d2a33c7 citra_android: Make strings more consistent 2023-06-15 03:35:10 -04:00
SachinVin
c074460f60 android: Bump to gradle 8.0 2023-06-12 18:39:42 +05:30
SachinVin
f5bb17c82e Android: Offload CIA installation to background thread 2023-06-12 18:39:40 +05:30
SachinVin
ccb2a7cbea android: minor refactor disk shadercache 2023-06-10 21:05:14 +05:30
Steveice10
238a574645
qt: Add support for building for iOS. (#6594) 2023-06-07 20:40:53 -07:00
Steveice10
d9bf4fd8a2
externals: Update dynarmic to 6.4.8 (#6596) 2023-06-07 20:25:28 -07:00
Steveice10
54c499ed5b
Prepare for Vulkan backend (#6595)
* externals: Add libraries required for vulkan

* build: Add support for downloading bundled MoltenVK.

* ci: Install tools needed for Vulkan.

* citra_qt: Add API status indicator

---------

Co-authored-by: GPUCode <geoster3d@gmail.com>
2023-06-05 07:29:05 -07:00