Commit graph

1015 commits

Author SHA1 Message Date
GPUCode
c7f8bc5582 file_util: Check fd before using dup 2023-03-24 16:56:31 +02:00
hank121314
8d563d37b4
citra_android: Storage Access Framework implementation (#6313) 2023-03-23 14:30:52 +01:00
Mai
8c12eb4905
Merge pull request #6360 from SachinVin/b
common\common_funcs.h:  use __builtin_trap for Crash()
2023-03-21 21:55:35 -04:00
GPUCode
0c3fe272b6
citra_qt: Add enhancement options to per-game (#6308)
Co-authored-by: Tobias <thm.frey@gmail.com>
2023-03-21 22:12:13 +01:00
SachinVin
8434d30768 common\common_funcs.h: use __builtin_trap for Crash() 2023-03-21 22:34:06 +05:30
SachinVin
794d051f0c
common\CMakeLists.txt: add missing arch.h (#6359) 2023-03-21 17:06:28 +01:00
Vitor K
6fbc54b0c5
citra-qt: fixes to per game settings (#6298)
* citra-qt config: small misc changes

Remove unused ReadSettingGlobal

Remove unused WriteSetting overload

ReadGlobalSetting: rename default value variable

* qt config: fix u16 values being written as QMetaType

* qt config: rework post processing shader setting

handles post processing setting properly when per-game settings are used.
the anaglyph shader is given its own setting, separate from the post
processing name.

* qt config: use u32 instead of unsigned int when casting
2023-03-13 23:02:07 +02:00
Steveice10
c96f54f022
Implement app management support (suspend, resume, close, etc) (#6322) 2023-03-10 00:44:26 +01:00
komasanzura
9eb1cd2875
Added an option to set the proportion of the screens when using layout "Large Screen Small Screen", to allow the user to define how much bigger the large screen should be with respect to the smaller screen. Currently the value must be between 1 and 16, but I could set a different maximum value if that would be desired. Thank you very much! (#6252) 2023-02-17 16:19:52 +02:00
SachinVin
5215468ff6
core\file_sys\archive_sdmc.cpp: Log error message if file failed to open. (#6284) 2023-02-14 22:19:45 +01:00
SomeDudeOnDiscord
a8e4e11cd5
Better Support for Picture-in-Picture Custom Layouts (Based on #6127) (#6247) 2023-02-14 22:06:11 +01:00
Steveice10
78cb48b23c
common: Make TrimSourcePath constexpr (#6279) 2023-02-03 19:01:10 +01:00
Steveice10
d704c6a3ac
common: Support macOS application data path conventions. (#6258) 2023-01-23 15:20:50 +05:30
Steveice10
a8848cce43 build: Update to support multi-arch builds. 2023-01-07 01:09:32 -08:00
Vitor K
c8ff1d744a
Change Monoscopic Render mode to a dropdown (#6215) 2022-12-24 03:17:49 +01:00
Tobias
ccb50e7f2c
Port yuzu-emu/yuzu#9300: "CMake: Use precompiled headers to improve compile times" (#6213)
Co-authored-by: Ameer J <52414509+ameerj@users.noreply.github.com>
2022-12-17 16:06:38 +01:00
Vitor K
84eada8c50
Fix "auto" resolution factor (#6218) 2022-12-13 01:05:08 +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
48ee112ceb
Add per game configuration options (#6187)
* common: Move settings to common from core.

- Removes a dependency on core and input_common from common.

* code: Wrap settings values

* Port from yuzu to allow per game settings

* citra_qt: Initial per-game settings dialog

* citra_qt: Use new API for read/save of config values

* citra_qt: Per game audio settings

* citra_qt: Per game graphics settings

* citra_qt: Per game system settings

* citra_qt: Per game general settings

* citra_qt: Document and run clang format

* citra_qt: Make icon smaller and centered

* citra_qt: Remove version number

* Not sure how to extract that, can always add it back later

* citra_qt: Wrap UISettings

* citra_qt: Fix unthottled fps setting

* citra_qt: Remove margin in emulation tab

* citra_qt: Implement some suggestions

* Bring back speed switch hotkey

* Allow configuration when game is running

* Rename/adjust UI stuff

* citra_qt: Fix build with separate windows

* citra_qt: Address feedback

* citra_qt: Log per-game settings before launching games

* citra_qt: Add shader cache options

* Also fix android build

* citra_qt: Add DLC menu option

* citra_qt: Run clang-format

* citra_qt: Adjust for time offset

* citra_qt: Implement suggestions

* Run clang-format

Co-authored-by: bunnei <bunneidev@gmail.com>
2022-12-08 13:27:25 +02:00
Merry
7cae35024f common: Add StringLiteral 2022-11-22 22:52:37 +00:00
merry
2967068b87
Merge pull request #5380 from FearlessTobi/port-3954
Port yuzu-emu/yuzu#3954: "main: Log host system memory parameters"
2022-11-15 11:31:59 +00:00
Lioncash
81bf21283f common/color: Migrate code over to the Common namespace
No external code makes use of this header, so we can freely change the
namespace.
2022-11-15 11:25:51 +01:00
FearlessTobi
de1fe7e6e3 Address review comments 2022-11-15 11:20:35 +01:00
Jan Beich
35f7f5e3e3 common: switch to nullptr for sysctl's empty new value 2022-11-15 10:34:56 +01:00
Jan Beich
6dabf10009 common: add sysconf() fallback
src/common/memory_detect.cpp:15:10: fatal error: 'sys/sysinfo.h' file not found
 #include <sys/sysinfo.h>
          ^~~~~~~~~~~~~~~
2022-11-15 10:34:56 +01:00
Morph
cb8b72069f Fix macOS code and change "Swapfile" to "Swap" 2022-11-15 10:34:56 +01:00
Morph
a67f205cfe main: Log host system memory parameters
Logs both physical memory and swapfile sizes, this is useful for support.
2022-11-15 10:34:56 +01:00
Tobias
bb05d8c12a
src/CMakeLists: Enforce multiple warnings on MSVC (#5692) 2022-11-09 23:14:28 +01:00
Tobias
1ddea27ac8
code: Cleanup and warning fixes from the Vulkan PR (#6163)
Co-authored-by: emufan4568 <geoster3d@gmail.com>
Co-authored-by: Kyle Kienapfel <Docteh@users.noreply.github.com>
2022-11-04 23:32:57 +01:00
SachinVin
fbe06234b1 Core: Port Exclusive memory impl from yuzu
core\arm\dynarmic\arm_dynarmic.cpp: fix build

core\arm\dynarmic\arm_dynarmic.cpp: Fixes

CPP 20
2022-10-23 13:19:33 +05:30
SachinVin
4a590d1fcb xbyak: Correct xbyak include directory
xbyak is intended to be installed in /usr/local/include/xbyak.
Since we desire not to install xbyak before using it, we copy the headers
to the appropriate directory structure and use that instead
Co-authored-by: merry <git@mary.rs>
2022-10-23 13:19:32 +05:30
Vitor K
9626bdf385
Gate use of custom directories behind a variable (#6157)
previous changes had forced every single user to use custom
directories for NAND and SDMC. Those paths were saved to the
config file and would interact badly with portable builds.
2022-10-22 19:09:47 +05:30
liushuyu
c6153bb32e
CI: fix recent build issues (#6148)
Co-authored-by: Vitor K <vitor-kiguchi@hotmail.com>
2022-10-05 18:43:07 +02:00
Vitor K
6a9d36608f
Allow GetPhysicalRef to hold a past-the-end offset (#6141)
Games will sometimes use these when representing open right bounds
and so disallowing it caused regressions, with a notable example
being when MemoryFill is called to the end of vram, causing an
"invalid end address" error.
This had been noted on a comment in GetPhysicalRef prior to the
regression.
2022-10-01 16:07:27 +05:30
GPUCode
cbd5d1c15c
Upgrade codebase to C++ 20 + fix warnings + update submodules (#6115) 2022-09-21 18:36:12 +02:00
Vitor Kiguchi
a8d82a2a04 Include gl_shader_util in shader cache version hash calculation 2022-09-03 14:44:40 +02:00
emufan4568
e6137d7874 renderer_opengl: Remove GLvec* types
* The common types already exist and provide all the functionality required, why invent new types?
2022-08-21 12:22:58 +03:00
JosJuice
ce07ef1821 android: Use correct encoding when converting strings
The JNI functions that have "UTF" their name use "modified UTF-8"
rather than the standard UTF-8 that Citra uses, at least according
to Oracle's documentation, so it is incorrect for us to use them.
This change fixes the problem by converting between UTF-8 and
UTF-16 manually instead of letting JNI do it for us.
2022-08-03 15:54:15 +02:00
SachinVin
d84b3d9330
Merge pull request #6053 from Morph1984/assert-noinline
common/assert: Use noinline lambda instead of a wrapper template
2022-07-03 11:50:50 +05:30
Morph
edbe7600f5 common/assert: Use noinline lambda instead of a wrapper template
MSVC now supports specifying __declspec on lambda functions
2022-06-30 08:58:36 -04:00
Morph
49c0ed297f common_funcs: Add CITRA_NO_INLINE 2022-06-14 07:18:12 -04:00
Morph
1cc1c33a15 common: Resolve C4267 warning on MSVC
Also removes Timer::GetDoubleTime() as it is unused.
2022-05-18 00:05:40 -04:00
SachinVin
b6ff58a9d6 FileUtil, Frontends: Fix updating custom NAND/SDMC path 2022-04-30 15:53:45 +05:30
SachinVin
0af8406e44 Common: Add CPU feature detection for ARM64 2022-04-14 20:44:57 +05:30
bunnei
6dfb74a8b9
Merge pull request #5906 from SachinVin/android2
Backport some more stuff from android
2022-01-04 17:40:33 -08:00
SachinVin
1079f61260 Android:file_util.cpp: remove unnecessary ROOT_DIR 2021-12-18 16:52:24 +05:30
Carloschi7
0126ecb3e2
added std::vector<V> instead of V* (#5902) 2021-12-18 12:01:09 +05:30
SachinVin
6183b5d76c
Merge pull request #5823 from SachinVin/dyn
Android: Backport easy stuff
2021-10-03 18:58:20 +05:30
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
Pengfei
f85bde3ca3
Replace &vec[0] with vec.data()
When the vector is empty, using `&vec[0]` involves undefined behaviour. While that works fine most of the time, Flatpak builds aborted on a failed `__builtin_expect`.

I searched for such occurences across the codebase with the regex `(?<!&)&\w+\[0\]` and fixed those that would potentially cause issues.
2021-07-14 17:01:14 +08:00
Max Fedotov
a2f34ea82b
gcc 11 compatibility fix (suggestion) (#5778)
Fixes missing include and runtime variable in offsetof

* gcc 11 compatibility fix

* Revert "gcc 11 compatibility fix"

This reverts commit bf5711d944.

* gcc 11 compatibility fix (with pointer math)

* Don't require pointers for framebuffer field math

* Code style fix (clang-format)
2021-05-10 22:10:29 -05:00
bunnei
9ff97270cf
Merge pull request #5501 from FearlessTobi/port-1064-3948
Port yuzu-emu/yuzu#1064 and yuzu-emu/yuzu#3948: Changes to Telemetry and CPU feature detection
2021-04-23 22:58:08 -07:00
Daniel Méndez
3be52f818a file_util: Add a function to update the user path
Added a default value when sdmc and nand are empty
2021-04-17 23:48:30 +02:00
Morph
7806206e90 string_util: Remove MSVC workaround for converting between UTF8/UTF16
This has been fixed as of Visual Studio 2019 Version 16.2
2021-02-11 00:16:33 +01:00
Marshall Mohror
5776bdda82
Merge pull request #5546 from FearlessTobi/port-5524
Port yuzu-emu/yuzu#4086 and yuzu-emu/yuzu#4611: Xbyak cleanups
2021-02-08 16:00:18 -06:00
Pengfei Zhu
7c6d7905a4
Merge pull request #5670 from FearlessTobi/port-5277
Port yuzu-emu/yuzu#5277: "general: Fix various spelling errors"
2021-01-09 22:10:27 +08:00
Lioncash
10f440cb59 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2021-01-04 05:17:13 +01:00
Lioncash
9c08409e0e externals: Update Xbyak to 5.96
I made a request on the Xbyak issue tracker to allow some constructors
to be constexpr in order to avoid static constructors from needing to
execute for some of our register constants.

This request was implemented, so this updates Xbyak so that we can make
use of it.
2021-01-04 05:11:18 +01:00
FearlessTobi
ddb4135dea main/common: Log/append AVX/FMA to the Host CPU string if available and add AVX512 detection
Co-Authored-By: Morph <morph1984@users.noreply.github.com>
2021-01-04 04:25:03 +01:00
Lioncash
52fe6daa53 common/telemetry: Migrate core-independent info gathering to common
Previously core itself was the library containing the code to gather
common information (build info, CPU info, and OS info), however all of
this isn't core-dependent and can be moved to the common code and use
the common interfaces. We can then just call those functions from the
core instead.

This will allow replacing our CPU detection with Xbyak's which has
better detection facilities than ours. It also keeps more
architecture-dependent code in common instead of core.
2021-01-04 04:25:03 +01:00
MerryMage
045d20e076 xbyak_abi: Prefer returning a struct to using out parameters in ABI_CalculateFrameSize 2021-01-04 04:07:11 +01:00
MerryMage
a841ce6451 xbyak_abi: Register indexes should be unsigned 2021-01-04 04:07:10 +01:00
xperia64
c1d7ba4d60
Delete the old log file before rotating (#5675) 2021-01-03 14:53:23 -05:00
FearlessTobi
1653ebaa45 general: Fix various spelling errors
Co-Authored-By: Morph <39850852+Morph1984@users.noreply.github.com>
2021-01-03 02:39:41 +01: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
Vitor Kiguchi
fb49ce462f Revert #5530 "Port yuzu-emu/yuzu#4539"
There is currently no such warning and the solution proposed
omits the call instead of the warning.
2020-12-30 14:49:40 -03:00
bunnei
987f910a86
Merge pull request #5530 from FearlessTobi/port-4539
Port yuzu-emu/yuzu#4539: "common: Silence two discarded result warnings"
2020-12-30 01:55:33 -08:00
Vitor K
4888a14c12
Make UNIMPLEMENTED_MSG consistent with UNIMPLEMENTED (#5631)
The current inconsistency can result in a developer unintentionally
creating a crash when using UNIMPLEMENTED_MSG, if they're only
familiar with UNIMPLEMENTED. The two macros shouldn't have such
wildly different behaviors.
2020-12-06 23:36:04 +01:00
Tobias
017631e51b
Port yuzu-emu/yuzu#4587 and yuzu-emu/yuzu#4588: Fix data races (#5545)
Co-authored-by: ReinUsesLisp <reinuseslisp@airmail.cc>
2020-09-19 18:42:21 +02:00
comex
2ba35cab73 Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
2020-09-03 03:15:14 +02:00
Tobias
66846836bc
Port yuzu-emu/yuzu#4577: "common/assert: Make use of C++ attribute syntax" (#5529)
Co-authored-by: Lioncash <mathew1800@gmail.com>
2020-09-02 17:25:31 +02:00
Tobias
f6b543886c
Port yuzu-emu/yuzu#4528: "common: Make use of [[nodiscard]] where applicable" (#5535)
Co-authored-by: LC <712067+lioncash@users.noreply.github.com>
2020-08-31 21:06:16 +02:00
Lioncash
41f42d8df3 common: Silence two discarded result warnings
These are intentionally discarded internally, since the rest of the
public API allows querying success. We want all non-internal uses of
these functions to be explicitly checked, so we can signify that we
intentionally want to discard the return values here.
2020-08-28 16:32:13 +02:00
Marshall Mohror
bd7ee8c315
Common: remove a mod from AlignUp (#5441)
In cases where the size is not a known constant when inlining, AlignUp<std::size_t> currently generates two 64-bit div instructions.
This generates one div and a cmov which is significantly cheaper.
2020-07-07 16:39:23 -05:00
LC
8ce81b19be
General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
2020-06-19 09:10:45 -05:00
Ben
307b8f923b
Merge pull request #5224 from FearlessTobi/port-3630
Port yuzu-emu/yuzu#3630: "common/file_util: Allow access to files on network shares"
2020-05-13 18:28:01 +02:00
Ben
d11d600b61
Merge pull request #5225 from FearlessTobi/port-3672
Port yuzu-emu/yuzu#3672: "file_util: Early-exit in Write/ReadArray if specified lengths are zero"
2020-05-11 09:45:39 +02:00
Lioncash
6ed4431d8b file_util: Early-exit in WriteArray and ReadArray if specified lengths are zero
It's undefined behavior to pass a null pointer to std::fread and
std::fwrite, even if the length passed in is zero, so we must perform
the precondition checking ourselves.

A common case where this can occur is when passing in the data of an
empty std::vector and size, as an empty vector will typically have a
null internal buffer.

While we're at it, we can move the implementation out of line and add
debug checks against passing in nullptr to std::fread and std::fwrite.
2020-05-11 01:58:13 +02: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
Pengfei Zhu
017f0c469e
Merge pull request #5301 from lioncash/chunk
common: Remove chunk_file.h
2020-05-01 23:02:47 +08:00
Lioncash
246cea229c common: Remove chunk_file.h
This is part of Dolphin's serialization code, which isn't used and
probably never will be, considering that savestates are implemented with
boost.
2020-05-01 08:23:59 -04:00
Lioncash
f20120e5a7 gl_shader_gen: Mark hash implementations as noexcept
These shouldn't throw at all, so we can mark the interface as such.
2020-04-30 22:57:36 -04:00
Ben Russell
fb941c56d8 common/file_util: Allow access to files on network shares
On Windows, network shares use paths like \\server\share\file which were
being broken by FileUtil::SanitizePath() removing double slashes.

Changed the code in SanitizePath to permit a double-backslash if it
occurs at the start of a filepath (on Windows only).
2020-04-18 04:36:12 +02:00
Ben
c605bb42db
Merge pull request #4908 from hamish-milne/feature/savestates-2
Save states
2020-04-17 21:52:51 +02:00
Tobias
32cbb1bc77
input_common/udp: Port various changes from yuzu (#5133) 2020-04-17 02:50:28 +02:00
Hamish Milne
915c426dc9 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-04-12 22:26:24 +01:00
Hamish Milne
828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne
e9ab8f82d4 Add disk archive serialization (fix crash in driver renegade etc.) 2020-04-11 11:52:11 +01:00
Hamish Milne
432ac24503 Fix memory region serialization (OSK crash) 2020-04-10 16:51:01 +01:00
MerryMage
f2499953c0 travis: Update xcode
Update to 10.2 (required for CTAD to work correctly)
2020-04-07 22:07:06 +01:00
Hamish Milne
b5f394dd12 Use placeholders for serialized paths 2020-04-05 00:20:59 +01:00
Marshall Mohror
9c7da35382
Merge pull request #5083 from zhaowenlan1779/video-dumping-update
video_core, citra_qt: Video dumping updates
2020-04-03 21:15:32 -05:00
Hamish Milne
5b6ee9a6ab Clear out state before deserialization - fixes many crashes. 2020-04-01 22:06:22 +01:00
Hamish Milne
f156fdd332 clang format fixes etc. 2020-03-31 18:27:33 +01:00
Hamish Milne
92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne
04aa351c40 Code review - general gardening 2020-03-29 16:14:36 +01:00
Hamish Milne
8f059ae398
Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-29 11:39:46 +01:00