Commit graph

4322 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
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
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
GPUCode 7edc86a9bc
code: Remove outdated comment style (#6640) 2023-06-25 15:22:41 +05:30
GPUCode 7616496456
video_core: Add debug scopes (#6634) 2023-06-23 03:37:13 +02:00
SachinVin 8eb89c260d core: fix warnings 2023-06-17 21:23:58 +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
Steveice10 abd949fea1
qt: Add NCCH secure 1/2 to keys needed for system titles download. (#6586) 2023-06-02 19:16:48 -07:00
Steveice10 723b662604
core: Update minimal system title set. (#6573) 2023-05-31 17:34:31 -07:00
Steveice10 4ddb2116bf
qt: Allow toggling whether to enter system setup on home menu boot. (#6574) 2023-05-31 11:56:35 +03:00
Steveice10 b45c7188c7
chore: Fix some compiler warnings. (#6578) 2023-05-30 12:36:12 -07:00
SachinVin a1d265325a
Merge pull request #6561 from SachinVin/audio
audio_core/hle: Refactor Binary Pipe data structures
2023-05-30 19:02:37 +05:30
PabloMK7 5c45c97ff9
Implement/Fix more SOC related functions (#6267)
* Implement SOC_U::GetHostByName and partial SOC_U::GetNetworkOpt

* Implement AC::GetWifiStatus, and get proper network interface.

* Minor fixes

* More minor fixes

* Even more fixes

* Fix Get/Set SockOpt

* Implement SendToOther

* Apply suggestions and fix timer advance

* Fix variable name

* Add more sockopt values and fix send/recv flags.

* Fix dontwait logic

* Add missing header for linux

* Remove TCP_STDURG

* Fix poll and add more 3ds <-> platform conversions

* Finish implementing all platform <-> 3ds conversion.

* Disable UDP connreset and fix poll again.

* Fix compile issues

* Apply suggestions

* Fix compiler issues

* Fix compiler errors (again)

* Fix GetAddrInfo

* Use IPC::MakeHeader instead of raw hardcoded value.
2023-05-21 19:01:08 -07:00
SachinVin 975ee15635 audiocore/{hle, lle}: remove dependence on static core timing 2023-05-20 21:27:22 +05:30
Steveice10 7d6c14e584
dumper: Fix pixel format for filters when passed in via encoder options. (#6553) 2023-05-19 10:58:05 -07:00
Steveice10 b89f5278ac
Revive: dumping/ffmpeg_backend: Various fixes (#6528)
* dumping/ffmpeg_backend: Add FPS filter

So that the recorded video can be at 60FPS (which is supported by most encoders) while still maintaining correct speed.

* dumping/ffmpeg_backend: Add HW context support

Required for some HW acceled encoders. Not tested as my devices don't seem to require this.

* CMake: Copy avfilter dll for MSVC

* CMakeLists: Require FFmpeg 4.0

* ffmpeg: Fix dumper compile error on MSVC.

* ffmpeg: Address review comments.

---------

Co-authored-by: zhupengfei <zhupf321@gmail.com>
2023-05-16 02:28:21 -07:00
luc-git 322d7a8287
Textures loading screen (#6478)
* Add a loading screen for the preloading textures

*The PreloadTextures() function is called from the EmuThread to prevent citra to freezing

*Add a the preloading textures loadingscreen in loading_screen.cpp

*Add custom_tex_manager.reset() in core.cpp to release ram memory after exiting a game

* Add custom textures loading in EmuThread

* Remove useless variable

* Revert "Add custom textures loading in EmuThread"

This reverts commit 45ed46fa09.

* Moved include from bootmanager.h to bootmanager.cpp
2023-05-07 02:34:14 +03:00
Steveice10 2273df4d70
qt: Migrate to Qt6. (#6418) 2023-05-05 03:10:34 -07:00
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 055a58f01e
audio_core: Implement OpenAL backend (#6450) 2023-05-01 21:17:45 +02:00
SachinVin ce553ab995
renderer_opengl: DrawSingleScreen*: remove duplicate code (#6426)
Co-authored-by: Tobias <thm.frey@gmail.com>
2023-05-01 16:27:42 +02:00
luc-git 7327c334ca
Add cheats in per game configuration (#6379) 2023-04-30 16:36:02 +02:00
Steveice10 ea649263b7
build: Improvements to bundled libraries support. (#6435) 2023-04-28 13:02:53 -07:00
PabloMK7 63bc0b59bb
Use IPC:MakeHeader instead of hardcoded raw values for IPC command tables. (#6453)
* Use IPC:MakeHeader instead of hardcoded values for IPC command tables.

* Use u32 instead of unsigned int in MakeHeader function

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>

* Fix clang format

---------

Co-authored-by: SachinVin <26602104+SachinVin@users.noreply.github.com>
2023-04-27 22:31:03 -07:00
GPUCode 06f3c90cfb
Custom textures rewrite (#6452)
* common: Add thread pool from yuzu

* Is really useful for asynchronous operations like shader compilation and custom textures, will be used in following PRs

* core: Improve ImageInterface

* Provide a default implementation so frontends don't have to duplicate code registering the lodepng version

* Add a dds version too which we will use in the next commit

* rasterizer_cache: Rewrite custom textures

* There's just too much to talk about here, look at the PR description for more details

* rasterizer_cache: Implement basic pack configuration file

* custom_tex_manager: Flip dumped textures

* custom_tex_manager: Optimize custom texture hashing

* If no convertions are needed then we can hash the decoded data directly removing the needed for duplicate decode

* custom_tex_manager: Implement asynchronous texture loading

* The file loading and decoding is offloaded into worker threads, while the upload itself still occurs in the main thread to avoid having to manage shared contexts

* Address review comments

* custom_tex_manager: Introduce custom material support

* video_core: Move custom textures to separate directory

* Also split the files to make the code cleaner

* gl_texture_runtime: Generate mipmaps for material

* custom_tex_manager: Prevent memory overflow when preloading

* externals: Add dds-ktx as submodule

* string_util: Return vector from SplitString

* No code benefits from passing it as an argument

* custom_textures: Use json config file

* gl_rasterizer: Only bind material for unit 0

* Address review comments
2023-04-27 07:38:28 +03:00
SachinVin 000a616bd9
core\loader\ncch.cpp: skip parsing Region info, if user has already... (#6463) 2023-04-26 00:13:21 +02:00
SachinVin 5f81940e63
Merge pull request #6419 from vitor-k/states
Update zstd and improve savestates logging
2023-04-15 10:11:40 +05:30
SachinVin 2a2ee8bc96
Merge pull request #6395 from ian-h-chamberlain/feature/gdbstub-hio
Initial port of luma3ds' gdb_hio to Citra
2023-04-11 20:32:48 +05:30
Ian Chamberlain 025913a734
Fix string_view constructor for macOS clang
Some versions of clang 14 (macOS+android) don't implement
`string_view(It first, It last)`, so let's use
`string_view(const CharT*, size_type)` instead.

Also remove unused header leftover from old code that uses std::string.
2023-04-11 10:06:08 -04:00
Vitor Kiguchi dccd89b796 savestates: various changes
The header doesn't need to be serialized.
GetSaveStatePath may be static.
Remove unused includes.
Name the CryptoPP stringsource.
2023-04-10 00:51:02 -03:00
Vitor Kiguchi c79acdd88d savestates: validate states before load 2023-04-10 00:51:02 -03:00
Vitor Kiguchi 8e8c8fa37a savestates: log slot on load and save 2023-04-10 00:51:02 -03:00
Steveice10 b6e73f0d49
Add consolidated GodMode9 key dumping script. (#6396) 2023-04-09 21:16:31 +02:00
SachinVin 8d19483b7e
externals: bump dynarmic to 6.4.6 (#6423) 2023-04-09 21:03:48 +02:00
SachinVin a94acde519
core\frontend\framebuffer_layout: GetCardboardSettings: clean up floa… (#6399)
* core\frontend\framebuffer_layout: GetCardboardSettings: clean up float to u32 conversion warnings + style fixes

* clang format

* fix signedness
2023-04-09 10:59:25 +05:30
SachinVin e4e9fb4aed
Merge pull request #6412 from GPUCode/wayland-oops
Port yuzu-emu/yuzu#7410: "Wayland fixes"
2023-04-08 16:51:56 +05:30
Steveice10 287ce1e56f
kernel: Skip address range checks for privileged memory (un)map. (#6407) 2023-04-06 14:30:13 +02:00
Ian Chamberlain 4cc181e5b8
Address review comments
Use more modern C++ style casts + std::array, clean up some log
messages, and rename some functions.
2023-04-05 12:41:17 -04:00
Ian Chamberlain 696c0904f8
Update some c-style casts -> reinterpret_cast 2023-04-04 13:21:25 -04:00
Ian Chamberlain 6e45de760e
Cleanup new code, add docs and error handling 2023-04-04 13:13:24 -04:00
SeleDreams 62d58f669a
kernel: Adjusted resource limits for more accuracy to the running 3DS model (#6393)
Co-authored-by: Tobias <thm.frey@gmail.com>
2023-04-04 19:03:08 +02:00
Steveice10 5f90c9816d
apt: Add stub for ns:c service. (#6409) 2023-04-04 19:01:37 +02:00
Ian Chamberlain 0d4c93d1c2
Undo some changes exposing unused functions 2023-04-04 12:20:41 -04:00
GPUCode 71d4a85957 video_core: Disable async shader loading with strict contexts 2023-04-03 14:32:13 +03:00
Steveice10 041252ba36
file_sys: Attempt to open New 3DS variant NCCH if available. (#6383) 2023-04-02 08:57:56 +05:30
Steveice10 a74d7a0e6b
qt: Hide system titles with invisible or invalid SMDH data. (#6381) 2023-04-02 08:57:22 +05:30
Ian Chamberlain 351730d585
Fix infinite hang if GDB client kills gdbstub 2023-03-31 14:06:43 -04:00
Ian Chamberlain 83138e0c63
Fix some build + impl errors with HIO
After rebase there were some API changes, also fix continuation logic in
the main gdbstub.
2023-03-31 14:05:57 -04:00