Commit graph

9648 commits

Author SHA1 Message Date
ameerj a1443356f1 threadsafe_queue: Add std::stop_token overload to PopWait
Useful for jthreads which make use of the threadsafe queues.
2023-06-30 12:15:52 +03:00
ameerj aa39430e2c common/logging: Reduce scope of fmt include 2023-06-30 12:15:52 +03:00
ameerj 8f51dd9513 common/logging: Move Log::Entry declaration to a separate header
This reduces the load of requiring to include std::chrono in all files which include log.h
2023-06-30 12:15:52 +03:00
ameerj 98e9f4c32e logging: Fix log filter during initialization
The log filter was being ignored on initialization due to the logging instance being initialized before the config instance, so the log filter was set to its default value.

This fixes that oversight, along with using descriptive exceptions instead of abort() calls.
2023-06-30 12:15:51 +03:00
yzct12345 a8340395a3 logging: Display backtrace on crash
This implements backtraces so we don't have to tell users how to use gdb anymore.

This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.

I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
2023-06-30 12:15:51 +03:00
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