Commit graph

7745 commits

Author SHA1 Message Date
Subv
d17557c02c Warnings/Network: Initialize the members of Room::RoomImpl in the order they are defined. 2020-04-11 12:24:09 -05:00
Subv
7903f6fbfc Warnings/Network: Handle ENET_EVENT_TYPE_NONE and ENET_EVENT_TYPE_CONNECT in the network packet loop.
ENET_EVENT_TYPE_NONE is basically a no-op.

ENET_EVENT_TYPE_CONNECT should not happen since we are already connected. Assert in case we do receive it.
2020-04-11 12:23:57 -05:00
Hamish Milne
e9ab8f82d4 Add disk archive serialization (fix crash in driver renegade etc.) 2020-04-11 11:52:11 +01:00
Hamish Milne
a210e7e2bd Sync GPU state after loading (fix FE terrain bug) 2020-04-11 10:28:52 +01:00
Hamish Milne
7b3a8e9bf5 Fix clang format 2020-04-10 20:22:40 +01:00
Hamish Milne
7988978661 Fix VFP registers serialization (0 fps when loading etc.) 2020-04-10 19:36:38 +01:00
Hamish Milne
432ac24503 Fix memory region serialization (OSK crash) 2020-04-10 16:51:01 +01:00
Hamish Milne
3278a4d7ef Fix crashes when loading with cameras active 2020-04-10 14:02:18 +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
MerryMage
8b7b6e9f74 arm_dynarmic: Remove dependence on interpreter 2020-04-07 19:07:59 +01:00
Vitor K
23921e3203
Option to hide mouse on inactivity (#5094)
* Add and implement option to hide mouse on iniactivity
+ clang format

* Set mouse hide timeout as a constant

* Address review comments, decrease mouse inactivity timeout to 2500ms

* Hide mouse: fix menubar bugs

squashable

* Hide mouse: ensure status bar has the default pointer
2020-04-07 09:58:51 -05:00
Hamish Milne
eb78fe0c10
Revert one change from #4844
This fixes #5067 by reverting a speculative change made in a previous PR.

From this one can conclude that, for disabled textures, black (0,0,0,1) is the correct colour and clear (0,0,0,0) is not.
2020-04-07 15:38:24 +01:00
Marshall Mohror
d37b0476ad
video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework (#5170)
* video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework

Adds RGBA4 -> RGB5A1 reinterpretation commonly used by virtual console
If no matching surface can be found, ValidateSurface checks for a surface in the cache which is reinterpretable to the requested format.
If that fails, the cache is checked for any surface with a matching bit-width. If one is found, the region is flushed.
If not, the region is checked against dirty_regions to see if it was created entirely on the GPU.
If not, then the surface is flushed.

Co-Authored-By: James Rowe <jroweboy@users.noreply.github.com>
Co-Authored-By: Ben <b3n30@users.noreply.github.com>

temporary change to avoid merge conflicts with video dumping

* re-add D24S8->RGBA8 res_scale hack

* adress review comments

* fix dirty region check

* check for surfaces with invalid pixel format, and break logic into separate functions
2020-04-07 09:12:32 -05:00
Hamish Milne
e74b44042b Added save + load hotkeys 2020-04-06 23:05:55 +01:00
MerryMage
d17ab5cd91 gdbstub: Fix some gdbstub jankiness
1. Ensure that register information available to gdbstub is most up-to-date.
2. There's no reason to check for current_thread == thread when emitting a trap.
   Doing this results in random hangs whenever a step happens upon a thread switch.
2020-04-06 21:24:54 +01:00
Hamish Milne
7ff985cef9 Fixed TAS movie serialization 2020-04-06 21:23:39 +01:00
Hamish Milne
ac37de10fc Reconnect cheat_engine during load 2020-04-06 20:26:41 +01:00
MerryMage
e04590a06d externals: Update dynarmic to b58048a 2020-04-06 17:31:30 +01:00
Vitor Kiguchi
69f7a83b0e Reenable hidapi for SDL2.0.12 and up 2020-04-04 20:30:09 -03:00
Hamish Milne
b5f394dd12 Use placeholders for serialized paths 2020-04-05 00:20:59 +01:00
Marshall Mohror
3b1b8b7e1f
Merge pull request #5123 from vitor-k/disable-hidapi
SDL: Disable hidapi drivers due to compatibility problems with certain controllers
2020-04-03 23:23:03 -05: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
Marshall Mohror
00667c222a
Merge pull request #5117 from FearlessTobi/n3ds-setting
citra_qt/system: Add N3DS mode checkbox and enable it by default
2020-04-03 17:52:31 -05:00
Marshall Mohror
f14e973a27
Texture Filtering v2 (#5166)
* video_core/renderer_opengl: Move SurfaceParams into its own file

Some of its enums are needed outside of the rasterizer cache
and trying to use it caused circular dependencies.

* video_core/renderer_opengl: Overhaul the texture filter framework

This should make it less intrusive.
Now texture filtering doesn't have any mutable global state.
The texture filters now always upscale to the internal rendering resolution.
This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function.
This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size.

* video_core/renderer_opengl: Use generated mipmaps for filtered textures

The filtered guest mipmaps often looked terrible.

* core/settings: Remove texture filter factor

* sdl/config: Remove texture filter factor

* qt/config: Remove texture filter factor
2020-04-02 22:42:50 -05:00
Khangaroo
d26564d020
Don't dump textures that aren't a power of 2 (#5152)
* don't dump textures that aren't a power of 2

* early return

* include bitset

* revert change to comment block

* explain change
2020-04-01 23:59:24 -05:00
Hamish Milne
74c06bd13e Attempt to fix crashes with LLE applets 2020-04-02 01:43:27 +01:00
Hamish Milne
d4ccce1365 Add some member initializers in thread 2020-04-02 00:14:00 +01:00
Hamish Milne
714a85119d Don't crash when getting perf stats 2020-04-01 22:50:19 +01:00
Hamish Milne
5b6ee9a6ab Clear out state before deserialization - fixes many crashes. 2020-04-01 22:06:22 +01:00
tbsp
7b93b51040 Added user IP to log events for join/left/kicked/banned 2020-04-01 08:09:28 -07: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
9bd189a155 More cleaning up 2020-03-29 19:07:56 +01:00
Hamish Milne
6760ea18b6 Serialize ArchiveManager and other code review actions 2020-03-29 18:56:25 +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
B3n30
ab76b0b684 addressed review comments 2020-03-28 22:47:11 +01:00
Hamish Milne
841255cd16 Attempt to fix the linux builds 2020-03-28 21:40:18 +00:00
Hamish Milne
de9ae14059 Only serialize wchar paths on windows 2020-03-28 19:29:29 +00:00
Hamish Milne
38e9eb379d
Update src/CMakeLists.txt 2020-03-28 17:23:54 +00:00
Hamish Milne
8f164a16ce Review changes 2020-03-28 17:08:27 +00:00
Hamish Milne
86600e90d3 Merge branch 'feature/savestates-2' of https://github.com/hamish-milne/citra into feature/savestates-2 2020-03-28 16:29:18 +00:00
Hamish Milne
d92b3e9754 Code review changes - clarified HTTP serialization 2020-03-28 16:29:15 +00:00
Hamish Milne
26f9364062
Apply suggestions from code review
Co-Authored-By: Ben <bene_thomas@web.de>
2020-03-28 16:28:07 +00:00
Hamish Milne
bbf8e876ab
Apply suggestions from code review
Co-Authored-By: Pengfei Zhu <zhupf321@gmail.com>
2020-03-28 16:26:24 +00:00
FearlessTobi
b4ac1c0559 citra_qt/system: Add N3DS mode checkbox and enable it by default 2020-03-28 16:49:35 +01:00
Hamish Milne
4aab38f133 Refactored out the horrible static var in CoreTiming 2020-03-28 15:47:36 +00:00
James Rowe
a6ee1bf913
HLE Audio: Increase frame position by input buffer sample rate (#5049)
* HLE Audio: Increase frame position by input buffer sample rate

Currently the frame position moves ahead by the number of samples
output, but thats a fixed number based on the 3ds native sample rate.
Instead, based on a homebrew by cyuubi and looking at the lle audio,
this sample position should be moved forward by the number of samples
from the input buffer that was read, based on the buffer's sample rate.
2020-03-28 10:39:50 -05:00
Hamish Milne
917d651a3c Added copyright notices on new files 2020-03-28 15:21:10 +00:00
Hamish Milne
025960bcdd Attempt to fix flatpak CI 2020-03-28 15:10:35 +00:00
Hamish Milne
03379b2072 Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:46:24 +00:00
Hamish Milne
7049af744f Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:33:21 +00:00
Hamish Milne
1ff8d002a9
Merge pull request #5025 from jroweboy/tomoscrewme
Add CPU Clock Frequency slider
2020-03-28 12:31:41 +00:00
Pengfei Zhu
3edc4a3055
service/ldr_ro: Fix CRO loading when the buffer contained multiple VM areas (#5125)
* vm_manager: Handle multiple areas in ChangeMemoryState

It is possible that a few areas have the same permisson and state, but with different backing pointers. Currently, this function assumes that only one continous area is found, but this is not always the case.

* service/ldr_ro: Handle multiple areas in VerifyBufferState

It is possible that the buffer passed from the game is made up of multiple areas with the same permisson and state but different backing pointers. Change the check to allow that.
2020-03-28 13:26:54 +01:00
Hamish Milne
232b52a27d Minor cleanup 2020-03-28 09:59:45 +00:00
Hamish Milne
3d1180ee21 DSP now works... committing this!! 2020-03-27 22:19:29 +00:00
Hamish Milne
5604613642 More merge fixes 2020-03-27 21:48:58 +00:00
Marshall Mohror
5dbf334ef1
Revert "Use immutable storage when available (#5053)" (#5151)
This reverts commit 407fd15515.
2020-03-26 19:01:18 -05:00
Vitor K
9226bffa96
Set render window to also accept focus via tabbing (Qt::StrongFocus) (#5089) 2020-03-26 13:36:49 -05:00
James Rowe
407fd15515
Use immutable storage when available (#5053)
Going to merge this because I plan to use it.
2020-03-26 12:53:55 -05:00
Marshall Mohror
feb5b5a394
common: include algorithm thread_queue_list.h (#5147)
build was failing because the compiler couldn't find std::find
2020-03-25 22:23:39 -05:00
Vitor K
480d3aaf19
common: Port some changes from dolphin (#5127)
* IOFile: Make the move constructor and move assignment operator noexcept

Certain parts of the standard library try to determine whether or not a
transfer operation should either be a copy or a move. The prevalent notion
of move constructors/assignment operators is that they should not throw,
they simply move an already existing resource somewhere else.

This is typically done with 'std::move_if_noexcept'. Like the name says,
if a type's move constructor is noexcept, then the functions retrieves an
r-value reference (for move semantics), or an l-value (for copy semantics)
if it is not noexcept.

As IOFile deletes the copy constructor and copy assignment operators,
using IOFile with certain parts of the standard library can fail in
unexcepted ways (especially when used with various container
implementations). This prevents that.

* fix various instances of -1 being assigned to unsigned types

* do not assign in conditional statements

* File/IOFile: Check _tfopen_s properly

* common/file_util.cpp: address review comments

Co-authored-by: Lioncash <mathew1800@gmail.com>
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
Co-authored-by: Sepalani <sepalani@hotmail.fr>
2020-03-25 14:33:37 -05:00
Pengfei Zhu
25ebf03c35
Merge pull request #5120 from zhaowenlan1779/file-write
service/fs: Update file size on write
2020-03-22 01:00:31 +08:00
zhupengfei
b87a15c6b2
citra_qt: Only resume the game if it wasn't paused
When dumping was stopped, the game will be paused and then resumed. However when the game was already paused this will result in the game being unexpectedly resumed, which isn't what we want.
2020-03-22 00:56:57 +08:00
zhupengfei
22bfa7b5de
ffmpeg: Misc fixes
The most important one being adding a mutex to protect the format_context. Apparently it wasn't thread safe (as one'd expect) but I didn't think about that.

Should fix some of the strange issues happening with MP4 muxers, etc.
2020-03-21 12:02:21 +08:00
Jan Beich
bb3decb983 video_core: don't use NULL for non-pointer after a7d3489dc9
src/video_core/renderer_opengl/texture_filters/bicubic/bicubic.cpp:51:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
src/video_core/renderer_opengl/texture_filters/xbrz/xbrz_freescale.cpp:95:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
 #define NULL    nullptr
                 ^~~~~~~
2020-03-19 00:10:43 +00:00
BreadFish64
37384174d9 fix formatting for media-ndk 2020-03-17 21:15:33 -05:00
B3n30
ed51f06097 fix path usage in InstallCia 2020-03-17 13:40:58 +01:00
zhang wei
3410b96400
mediandk for android (#4921) 2020-03-16 21:07:22 -05:00
Ben
590099a17a
CFG: Let GetSystemModel report model based on Settings:is_new_3ds (#5104)
* CFG: Let GetSystemModel report model based on  Settings:is_new_3ds

* Always write ol3ds console model to cfg savegame
2020-03-16 20:05:06 +01:00
Marshall Mohror
a7d3489dc9
video_core: add texture filtering (#5017)
video_core: add texture filtering
2020-03-16 09:42:05 -05:00
B3n30
eaaa76b922 Adressed review comments 2020-03-15 21:51:44 +01:00
B3n30
a4457d871c Log if common key during Ticket::Load is missing 2020-03-15 21:10:26 +01:00
B3n30
1d92343344 fix more review comments 2020-03-15 19:00:26 +01:00
B3n30
2465fd423a fix review comments 2020-03-15 18:57:29 +01:00
B3n30
391580c658 fix clang-format 2020-03-15 18:50:52 +01:00
B3n30
ae4ba287d5 warn if cia contend is encrypted 2020-03-15 18:23:19 +01:00
Pengfei Zhu
ad3c464e2d
Merge pull request #5116 from zhaowenlan1779/cam-vsync
service/cam: Implement Vsync interrupt events
2020-03-12 10:42:39 +08:00
Hamish Milne
da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
Vitor Kiguchi
8e3960b409 sdl_joystick: disable the use of the hidapi drivers due to many problems caused by them.
The main problem is the loss of compatibility with some controllers, but there are also
unwanted changes to the behaviour of PS4 controllers (hardcoded lightbar color).
2020-03-05 21:23:36 -03:00
zhupengfei
fc251b32b0
service/fs: Update file size on write
The file's size is stored in FileSessionSlot and retrieved when the game calls GetSize. However, it is not updated when the file is written to, which can possibly change the file size. Therefore, this can cause GetSize to return incorrect results.
2020-03-05 14:50:08 +08:00
Pengfei Zhu
7afcc0d658
Merge pull request #5106 from GovanifY/master
gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization
2020-03-03 23:53:28 +08:00
zhupengfei
28014496c6
Fix incorrect port_id use 2020-03-03 12:13:45 +08:00
zhupengfei
eced511382
service/cam: Implement Vsync interrupt callbacks
According to HW tests, this vsync event is signaled for activated cameras at about the same frequency as the frame rate. The last 5 vsync timings are recorded (in microseconds) and can be retrieved with the service function.

Also, corrected the default frame_rate to 15, according to HW test.

This should fix the missing camera images in certain games.
2020-03-01 17:07:43 +08:00
Vitor Kiguchi
c9b6233f59 NetworkMessage: create ErrorManager class to provide a context to tr 2020-02-29 20:48:58 -03:00
Vitor Kiguchi
d7f6cc3951 game_list_p.h: Specify the context for tr 2020-02-29 20:29:36 -03:00
Tobias
6d3d9f7a8a
core: Add support for N3DS memory mappings (#5103)
* core: Add support for N3DS memory mappings

* Address review comments
2020-02-29 19:48:27 +01:00
Marshall Mohror
ab8cb17ab7
Merge pull request #5111 from BreadFish64/interval
video_core: use explicit interval type in texture cache
2020-02-29 11:25:04 -06:00
zhupengfei
0fe832bb49
Make the arrays const 2020-02-29 09:11:34 +08:00
BreadFish64
cfd2ab6121 video_core: use explicit interval type in texture cache
The default is discrete_interval which has dynamic open-ness.
We only use right_open intervals anyway. In theory this could allow some compile-time optimizations.
2020-02-28 13:45:19 -06:00
zhupengfei
9d57325a8b
core/file_sys: Add alternative override pathes for ExeFS files
You can now directly place ExeFS overrides/patches inside the mod folder (instead of the exefs subfolder). This allows us to have drop-in compatibility with Luma3DS mods.
2020-02-28 23:36:17 +08:00
zhupengfei
a50ba7192b
citra_qt: Split options into 'Specific' and 'Generic'
For easier usage. Also made the option list sortable.
2020-02-28 18:26:20 +08:00
zhupengfei
f3e9780d10
ffmpeg: Avoid listing child classes for AVFormatContext and AVCodecContext
As they actually have every encoder/format as their child classes, this will result in a lot of extra options being added.
2020-02-28 16:40:13 +08:00
zhupengfei
a28eac08ae
ffmpeg: Properly handle non-planar formats
For non-planar formats, only the first data plane is used. Therefore,
they need to be handled differently in certain places.
2020-02-27 16:55:20 +08:00
zhupengfei
c9c26955d2
dumping_dialog: Prompt when path is empty 2020-02-27 16:55:19 +08:00
zhupengfei
8868d4db86
citra_qt: Fixed a bug when dumping dialog is cancelled or closed 2020-02-27 16:55:18 +08:00
zhupengfei
c38202bd30
dumping_dialog: Add a line edit for the options
So that users can just paste a set of parameters they found elsewhere.
2020-02-27 16:55:18 +08:00
zhupengfei
0a4be71913
citra_qt: Add simple video dumping error reporting
This is just a simple message that tells the user to refer to the log
2020-02-27 16:55:17 +08:00
zhupengfei
71c64c2617
citra_qt: Use the new dumping dialog
Note that it is only compiled in for FFmpeg video dumper enabled builds
2020-02-27 16:55:16 +08:00
zhupengfei
f82ba41fe0
citra_qt/dumping: Add dumping dialog
This is the main dialog of video dumping. This dialog allows the user to set output format, output path, video/audio encoder and video/audio bitrate.

When a format is selected, the list of video and audio encoders are updated. Only encoders of codecs that can be contained in the format is shown.
2020-02-27 16:55:16 +08:00
zhupengfei
e769d90aa8
citra_qt/dumping: Add options dialog
This is a simple list of name-value pairs of options. Users can double-click on an option to set or modify its value.
2020-02-27 16:55:15 +08:00
zhupengfei
94bc09d3ae
citra_qt/dumping: Add option set dialog
This dialog allows changing the value and unsetting one option. There are three possible variants of this dialog:

1. The LineEdit layout. This is used for normal options like string and duration, and just features a textbox for the user to type in whatever they want to set.

2. The ComboBox layout. This is used when there are named constants for an option, or when the option accepts an enum value like sample_format or pixel_format. A description will be displayed for the currently selected named constant. The user can also select 'custom' and type in their own value.

3. The CheckBox-es layout. This is used for flags options. A checkbox will be displayed for each named constant and the user can tick the flags they want to set.
2020-02-27 16:55:14 +08:00
zhupengfei
8c4bcf9f59
ffmpeg: Add ListFormats and ListEncoders
These two functions allow the frontend to get a list of encoders/formats and their specific options.

Retrieving the options is harder than it sounds due to FFmpeg's strange AVClass and AVOption system. For example, for integer and flags options, 'named constants' can be set. They are of type `AV_OPT_TYPE_CONST` and are categoried according to the `unit` field. An option can recognize all constants of the same `unit`.
2020-02-27 16:55:14 +08:00
zhupengfei
4161163d9c
ffmpeg: Correctly handle sample rates
Previously, we just used the native sample rate for encoding. However, some encoders like libmp3lame doesn't support it. Therefore, we now use a supported sample rate (preferring the native one if possible).

FFmpeg requires audio data to be sent in a sequence of frames, each containing the same specific number of samples. Previously, we buffered input samples in FFmpegBackend. However, as the source and destination sample rates can now be different, we should buffer resampled data instead. swresample have an internal input buffer, so we now just forward all data to it and 'gradually' receive resampled data, at most one frame_size at a time. When there is not enough resampled data to form a frame, we will record the current offset and request for less data on the next call.

Additionally, this commit also fixes a flaw. When an encoder supports variable frame sizes, its frame size is reported to be 0, which breaks our buffering system. Now we treat variable frame size encoders as having a frame size of 160 (the size of a HLE audio frame).
2020-02-27 16:55:13 +08:00
zhupengfei
8b9c01ded9
ffmpeg: Correctly handle sample format
We previously assumed that the first preferred sample format is planar, but that may not be true for all codecs. Instead we should find a supported sample format that is planar.
2020-02-27 16:55:12 +08:00
zhupengfei
17461b5d11
ffmpeg: Correctly set pixel format
While YUV420P is widely used, not all encoders accept it (e.g. Intel QSV only accepts NV12). We should use the codec's preferred pixel format instead as we need to rescale the frame anyway.
2020-02-27 16:55:11 +08:00
zhupengfei
834da14329
citra, citra_qt: Add video dumping config read/write
The default values are VP9/libvorbis just like before. The default configuration is provided for VP9
2020-02-27 16:55:11 +08:00
zhupengfei
016f8be0b8
core/dumping: Allow format/encoder selection+configuration
The ParamPackage got modified so that we can use range-based for on it
2020-02-27 16:55:10 +08:00
zhupengfei
3c6765e87c
core: Properly std::move things around 2020-02-27 16:55:09 +08:00
zhupengfei
06a0d86e9c
video_core, core: Move pixel download to its own thread
This uses the mailbox model to move pixel downloading to its own thread, eliminating Nvidia's warnings and (possibly) making use of GPU copy engine.

To achieve this, we created a new mailbox type that is different from the presentation mailbox in that it never discards a rendered frame.

Also, I tweaked the projection matrix thing so that it can just draw the frame upside down instead of having the CPU flip it.
2020-02-27 16:55:08 +08:00
B3n30
ebeea43fb8 Load RSA slot_0 data from bootrom; load and decrypt data from native firm for NCCHSecure2 keyslot 2020-02-26 16:43:53 +01:00
Pengfei Zhu
5b54a99f96
Merge pull request #5088 from zhaowenlan1779/layered-fs
core/file_sys: LayeredFS support
2020-02-25 07:48:10 +08:00
Gauvain "GovanifY" Roussel-Tarbouriech
8fedd5c240 gdbstub: small logic bug fix with defer_start 2020-02-24 14:30:24 +01:00
Gauvain "GovanifY" Roussel-Tarbouriech
d8bb37fc2f gdbstub: Ensure gdbstub doesn't drop packets crucial to initialization 2020-02-23 21:37:40 +01:00
Pengfei Zhu
1dfcb0937e
Merge pull request #5105 from GovanifY/master
ipc_debugger: Fixing NULL ptr call on multiple clear
2020-02-23 22:31:09 +08:00
liushuyu
cff00f38c5
Implements fdk_aac decoder (#4764)
* audio_core: dsp_hle: implements fdk_aac decoder

* audio_core: dsp_hle: clean up and add comments

* audio_core: dsp_hle: move fdk include to cpp file

* audio_core: dsp_hle: detects broken fdk_aac...

... and refuses to initialize if that's the case

* audio_core: dsp_hle: fdk_aac: address comments...

... and rebase commits

* fdk_decoder: move fdk header to cpp file
2020-02-23 11:01:21 +01:00
zhupengfei
8eacfceb6a
layered_fs: Fix missing file size update
This was a silly typo from a previous change.
2020-02-23 15:22:41 +08:00
Marshall Mohror
3ae1b5e2d6
Merge pull request #5047 from BreadFish64/patch-3
fix c++ standard flag for msvc
2020-02-22 21:18:08 -06:00
Gauvain "GovanifY" Roussel-Tarbouriech
2a616fcc5e ipc_debugger: Fixing NULL ptr call on multiple clear 2020-02-23 03:54:29 +01:00
James Rowe
59c159e8a0
Merge pull request #5087 from FearlessTobi/port-3374
Port yuzu-emu/yuzu#3374: "input_common/udp: Minor changes"
2020-02-22 14:54:45 -07:00
Marshall Mohror
688e44bc8b
videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function (#5101)
* videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function

GCC and MSVC copy the table at runtime with the old implementation, which is wasteful and prevents inlining. Unfortunately, static constexpr variables are not legal in constexpr functions, so the table has to be external.
Also replaced non-standard assert with DEBUG_ASSERT_MSG.

* fix case of table name in assert

* set table to private
2020-02-22 14:37:42 -07:00
James Rowe
276d56ca9b Add CPU Clock Frequency slider
This slider affects the number of cycles that the guest cpu emulation
reports that have passed since the last time slice. This option scales
the result returned by a percentage that the user selects. In some games
underclocking the CPU can give a major speedup. Exposing this as an
option will give users something to toy with for performance, while also
potentially enhancing games that experience lag on the real console
2020-02-21 16:03:07 -07:00
Marshall Mohror
990d27f4f9 Remove C++ standard flag 2020-02-21 16:45:02 -06:00
Ben
55ec7031cc
Core timing 2.0 (#4913)
* Core::Timing: Add multiple timer, one for each core

* revert clang-format; work on tests for CoreTiming

* Kernel:: Add support for multiple cores, asserts in HandleSyncRequest because Thread->status == WaitIPC

* Add some TRACE_LOGs

* fix tests

* make some adjustments to qt-debugger, cheats and gdbstub(probably still broken)

* Make ARM_Interface::id private, rework ARM_Interface ctor

* ReRename TimingManager to Timing for smaler diff

* addressed review comments
2020-02-21 19:31:32 +01:00
Ben
e3dbdcbdff
HTTP_C::Implement Context::MakeRequest (#4754)
* HTTP_C::Implement Context::MakeRequest

* httplib: Add add_client_cert_ASN1 and set_verify

* HTTP_C: Fix request methode strings case in MakeRequest

* HTTP_C: clang-format and cleanups

* HTTP_C: Add comment about async in BeginRequest and BeginRequestAsync

* Update httplib to contain all the changes we need; adapt http_c and web_services to the changes in httplib; addressed minor review comments

* Add android-ifaddrs
2020-02-21 19:04:04 +01:00
Marshall Mohror
996f1546b2
core: Remove outdated MSVC workarounds (#5099)
* core/hw/gpu: Remove outdated MSVC workarounds

* core/hle/service/hid: Remove MSVC workaround
2020-02-20 13:40:21 -06:00
zhupengfei
a487016cb4
core, citra_qt: Implement a save states file format and slot UI
10 slots are offered along with 'Save to Oldest Slot' and 'Load from Newest Slot'.

The savestate format is similar to the movie file format. It is called CST (Citra SavesTate), and is basically a 0x100 byte header (consisting of magic, revision, creation time and title ID) followed by Zstd compressed raw savestate data.

The savestate files are saved to the `states` folder in Citra's user folder. The files are named like `<Title ID>.<Slot ID>.cst`.
2020-02-18 13:19:52 +08:00
zhupengfei
7d880f94db
Add simple zstd compression
Just a simple default compression is able to shrink savestate file size from ~160MB to ~20MB.
2020-02-16 23:25:30 +08:00
Vitor K
4991c0121a
Remove duplicate code from the migration of frame limit to gene… (#5091) 2020-02-15 14:38:20 +01:00
zhupengfei
57efc41973
service/cecd: Add missing SessionData serialization 2020-02-14 17:15:08 +08:00
zhupengfei
7e8041df28
kernel/timer: Add missing base object 2020-02-14 17:13:53 +08:00
Hamish Milne
246ae84a52 Pretty sure ARM/Thread serialization works now 2020-02-13 17:42:12 +08:00
Hamish Milne
c983528862 Reworked DSP serialization 2020-02-13 17:42:12 +08:00
James Rowe
55c75b5e3e Add ClearAll to rasterizer cache for fully wiping the cache on save/load 2020-02-13 17:42:11 +08:00
James Rowe
3e34ad6890 Hack: Workaround crash when loading state and gyro is used 2020-02-13 17:42:11 +08:00
Hamish Milne
0effb229cd Fix geometry pipeline; attempt to fix motion controls 2020-02-13 17:42:10 +08:00
Hamish Milne
35c3ca995c Fixed a bug (??) in arm_dynarmic where PageTableChanged could reset the CPU context 2020-02-13 17:42:10 +08:00
Hamish Milne
b2370ea353 Fixed setting the right DSP service on deserialization 2020-02-13 17:42:10 +08:00
Hamish Milne
2217b3558d Fixed file services serialization 2020-02-13 17:42:10 +08:00
Hamish Milne
c24ea0f0ee Serialize core timing 2020-02-13 17:42:09 +08:00
Hamish Milne
8abc5525be Added Signals; more runtime fixes 2020-02-13 17:42:09 +08:00
Hamish Milne
e4f05884c3 Fixed serialization runtime exceptions 2020-02-13 17:42:08 +08:00
Hamish Milne
ca971ff31f Serialize file/directory services 2020-02-13 17:42:08 +08:00
Hamish Milne
9525d81344 More base-derived fixes 2020-02-13 17:42:07 +08:00
Hamish Milne
996aba39fe Correct exports; add some file serialization; fix service base object serialization 2020-02-13 17:42:07 +08:00
Hamish Milne
f2de70c3fb Fix crash bugs 2020-02-13 17:42:06 +08:00
Hamish Milne
116d22d562 Refactor out the wakeup_callback function pointer 2020-02-13 17:42:05 +08:00
Hamish Milne
7019561fd5 Bind NWM_UDS service in the constructor 2020-02-13 17:42:05 +08:00
Hamish Milne
96432589bd Use shared_ptr for PageTable 2020-02-13 17:42:04 +08:00
Hamish Milne
e4afa8e512 Make the tests pass 2020-02-13 17:42:04 +08:00
Hamish Milne
65d96bf6c1 Changed u8* to MemoryRef 2020-02-13 17:42:00 +08:00
Hamish Milne
cf985631e0 Minor tidying up 2020-02-13 17:41:27 +08:00
Hamish Milne
26e90a99cd Added basic UI; misc memory fixes 2020-02-13 17:41:27 +08:00
Hamish Milne
558e710e17 Finished archives; remove pod.h 2020-02-13 17:41:26 +08:00
Hamish Milne
2bf5b46460 Basic archive backend serialization 2020-02-13 17:41:26 +08:00
Hamish Milne
2d2c7218ef Serialize CECD, CFG services 2020-02-13 17:41:25 +08:00
Hamish Milne
ef2e503281 Serialize QTM, Y2R services 2020-02-13 17:41:24 +08:00
Hamish Milne
92857efca4 Serialize PTM service 2020-02-13 17:41:24 +08:00
Hamish Milne
f5e2f873b0 Serialize NWM service 2020-02-13 17:41:24 +08:00
Hamish Milne
571b1062f0 Serialize NIM, PS, PXI, SOC, SSL services 2020-02-13 17:41:23 +08:00
Hamish Milne
2409ee39cb Serialize IR, MVD, NDM, NEWS, NFC 2020-02-13 17:41:23 +08:00
Hamish Milne
3d6e372f96 More clang format fixes. Really need to standardise the version of this 2020-02-13 17:41:23 +08:00
Hamish Milne
01ec2e8a67 Serialize MIC service 2020-02-13 17:41:22 +08:00
Hamish Milne
e3c0211b74 Fix clang format 2020-02-13 17:41:22 +08:00
Hamish Milne
eb67167b7c Serialize IR service 2020-02-13 17:41:22 +08:00
Hamish Milne
8bd3e8cd27 Serialize HTTP service 2020-02-13 17:41:22 +08:00
Hamish Milne
74361fa3fb Serialize HID service 2020-02-13 17:41:21 +08:00
Hamish Milne
30494c06a4 Serialize GSP service 2020-02-13 17:41:21 +08:00
Hamish Milne
9877bf7d48 Change how the boost target works; disable external warnings in MSVC 2020-02-13 17:41:20 +08:00
Hamish Milne
d041901a30 Some more CI fixes 2020-02-13 17:41:20 +08:00
Hamish Milne
c7106e232f Fix a bug on mingw 2020-02-13 17:41:16 +08:00
Hamish Milne
d6862c2fca Some CI fixes 2020-02-13 17:40:52 +08:00
Hamish Milne
7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne
d482fb359c Attempting to fix mingw on windows 2020-02-13 17:38:25 +08:00
Hamish Milne
6917eaf53b Use load_construct_data for kernel objects 2020-02-13 17:38:25 +08:00
Hamish Milne
3ed8d95866 Serialize FS service; some compiler fixes 2020-02-13 17:38:24 +08:00
Hamish Milne
d1096de245 Added FRD service serialization 2020-02-13 17:38:24 +08:00
Hamish Milne
4354179156 Added ERR service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
452ae2e371 Added DSP service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
30fe2bfe38 Added DLP service serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
a0c3b91785 Added CSND serialization 2020-02-13 17:38:23 +08:00
Hamish Milne
17b9cbefef CAM service serialization 2020-02-13 17:38:22 +08:00
Hamish Milne
1185d62792 BOSS service serialization 2020-02-13 17:38:22 +08:00
Hamish Milne
5265c79056 APT service serialization 2020-02-13 17:38:21 +08:00
Hamish Milne
3e752002c4 Replace g_kernel with Core::Global etc. 2020-02-13 17:38:21 +08:00
Hamish Milne
e707685c2a Serialize AM services 2020-02-13 17:38:20 +08:00
Hamish Milne
89e4e49a63 Finished AC and ACT service serialization 2020-02-13 17:38:20 +08:00
Hamish Milne
3fd5c431f1 Service serialization framework; done AC 2020-02-13 17:38:20 +08:00
Hamish Milne
ac0337d8df Started IPC services serialization 2020-02-13 17:38:19 +08:00
Hamish Milne
7a5bde0b44 Serialize service manager, server prt 2020-02-13 17:38:19 +08:00
Hamish Milne
4f95575d41 Serialize some more kernel objects 2020-02-13 17:38:18 +08:00
Hamish Milne
8c81500dee Serialize kernel/hle/memory 2020-02-13 17:38:18 +08:00
Hamish Milne
050c3bdee5 Serialize primitive_assembly 2020-02-13 17:38:18 +08:00
Hamish Milne
c284192a87 Serialize geometry_pipeline 2020-02-13 17:38:17 +08:00
Hamish Milne
acc89b2251 Fixed an include 2020-02-13 17:38:17 +08:00
Hamish Milne
dc0d1ebc95 Added a TODO 2020-02-13 17:38:17 +08:00
Hamish Milne
f557d26b40 Added CPU, mutex, process, thread, timer 2020-02-13 17:38:16 +08:00
Hamish Milne
06891d9454 Added client/server objects 2020-02-13 17:38:16 +08:00
Hamish Milne
5035e68dad Added derived kernel objects 2020-02-13 17:38:15 +08:00
Hamish Milne
f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
Hamish Milne
45788b9c82 Added shader state serialization 2020-02-13 17:34:16 +08:00
Hamish Milne
6f00976ab5 video_core serialization 2020-02-13 17:34:16 +08:00
Hamish Milne
ee2cae2093 Added core serialization 2020-02-13 17:34:13 +08:00
Hamish Milne
dc04774ece Added POD serialization 2020-02-13 17:27:51 +08:00
Hamish Milne
6940c99ed6 Added boost serialization 2020-02-13 17:27:50 +08:00
Tobias
f106e76132
Port yuzu commit: "yuzu/CMakeLists: Disable implicit QString co… (#5074)
* yuzu/CMakeLists: Disable implicit QString conversions

Now that all of our code is compilable with implicit QString
conversions, we can enforce it at compile-time by disabling them.

Co-Authored-By: Mat M. <lioncash@users.noreply.github.com>

* citra_qt: Remove lots of implicit QString conversions

Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-02-11 13:12:09 +01:00
zhupengfei
4273b967b5
core/file_sys: Do not apply the same mods to DLCs
Now you can apply separate mods to DLCs and mods for the original title won't be applied.
2020-02-11 14:03:07 +08:00
FearlessTobi
4c2c27046d Fix compilation 2020-02-10 12:10:42 +01:00
Pengfei Zhu
b53b4bfb17 Merge pull request #5062 from FearlessTobi/port-3173
Port yuzu-emu/yuzu#3173: "common: SPSCQueue: Notify after incrementing queue size."
2020-02-10 12:10:45 +08:00
zhupengfei
b81c9bd738
fix clang format 2020-02-10 07:41:31 +08:00
Lioncash
7362fe48ac input_common/udp: Add missing override specifiers
Prevents trivial warnings and ensures interfaces are properly
maintained between the base class.
2020-02-09 23:00:02 +01:00
Lioncash
575ab92a76 input_common/udp: std::move SocketCallback instances where applicable
std::function is allowed to heap allocate if the size of the captures
associated with each lambda exceed a certain threshold. This prevents
potentially unnecessary reallocations from occurring.
2020-02-09 23:00:02 +01:00
Lioncash
fcdc191107 input_common/udp: std::move shared_ptr within Client constructor
Gets rid of a trivially avoidable atomic reference count increment and
decrement.
2020-02-09 23:00:02 +01:00
Lioncash
8a0f8c3a4f udp/client: Replace deprecated from_string() call with make_address_v4()
Future-proofs code if boost is ever updated.
2020-02-09 23:00:02 +01:00
Lioncash
7d45fdc1df input_common/udp: Silence -Wreorder warning for Socket
Amends the constructor initializer list to specify the order of its
elements in the same order that initialization would occur.
2020-02-09 23:00:01 +01:00
Lioncash
d7a58fe24d input_common/udp: Remove unnecessary inclusions 2020-02-09 23:00:01 +01:00
Lioncash
b39a611a3d input_common/udp: Add missing header guard 2020-02-09 23:00:01 +01:00
zhupengfei
d9ae4c332d
layered_fs: Do not open all replacement files on load
Instead open them when we want to read them. This is because the standard library has a limit on the number of opened files.
2020-02-09 21:48:42 +08:00
zhupengfei
b87bc5d351
citra_qt: Add 'Dump RomFS' menu action
A progress dialog will be displayed. However no progress is reported and the user also cannot cancel it.
2020-02-09 21:01:56 +08:00
zhupengfei
13e2d534e9
core: Add dump RomFS support
This is added to LayeredFS, then the NCCH container and then the loader interface.
2020-02-09 20:59:31 +08:00
James Rowe
03cde53cb6 Merge pull request #5077 from FearlessTobi/port-3339
Port yuzu-emu/yuzu#3339: "GUI: fix minor issues with dark themes + rename and reorder themes"
2020-02-08 12:49:15 -07:00
James Rowe
17e9522921
Merge pull request #5069 from vitor-k/min-window2
Update minimum window size based on current layout
2020-02-08 12:46:20 -07:00
zhupengfei
db18f6c79a
Address review
simplify code
2020-02-07 23:53:00 +08:00
zhupengfei
2ec99b83aa
core: Reset archive_manager on shutdown.
This holds the archives which include the SelfNCCH archive which holds the RomFS files. If we don't reset it the LayeredFS class can't get destructed and mods files won't be released.
2020-02-07 23:45:02 +08:00
zhupengfei
6e0afbaa19
Fix build
Explicitly use `std::min<std::size_t>`

Added virtual destructor
2020-02-07 16:26:33 +08:00
zhupengfei
eed9de2336
core/file_sys: Allow exheader replacement to be read from mods path
The previous method (filename.exheader) can still be used.
2020-02-07 15:55:35 +08:00
zhupengfei
53d0c618a0
core/file_sys: Read mods for the original title for updates
Updates can override RomFS and ExeFS, therefore we should apply the mods to them as well.
2020-02-07 15:20:20 +08:00
zhupengfei
7c652a0479
citra_qt: Add 'Open Mods Location' 2020-02-07 15:20:20 +08:00
zhupengfei
91e5a39a08
core/file_sys: Allow exefs mods to be read from mods path
The original path (file_name.exefsdir) is still supported, but alternatively users can choose to put exefs patches in the same place as LayeredFS files (`load/mods/<Title ID>/exefs`).
2020-02-07 15:20:19 +08:00
zhupengfei
8a570bf00c
core: Use LayeredFS while reading RomFS
Only enabled for NCCHs that do not have an override romfs.

LayeredFS files should be put in the `load` directory in User Directory. The directory structure is similar to yuzu's but currently does not allow named mods yet. Replacement files should be put in `load/mods/<Title ID>/romfs` while patches/stubs should be put in `load/mods/<Title ID>/romfs_ext`.
2020-02-07 15:20:18 +08:00
zhupengfei
890405bb7c
core/file_sys: LayeredFS implementation
This implementation is different from Luma3DS's which directly hooks the SDK functions. Instead, we read the RomFS's metadata and figure out the directory and file structure. Then, relocations (i.e. replacements/deletions/patches) are applied. Afterwards, we rebuild the metadata, and assign 'fake' data offsets to the files. When we want to read file data from this rebuilt RomFS, we use binary search to find the last data offset smaller or equal to the given offset and read from that file  (either from the original RomFS, or from replacement files, or from buffered data with patches applied) and any later files when length is not enough.

The code that rebuilds the metadata is pretty complex and uses quite a few variables to keep track of necessary information like metadata offsets. According to my tests, it is able to build RomFS-es identical to the original (but without trailing garbage data) when no relocations are applied.
2020-02-07 15:19:57 +08:00
zhupengfei
83e0cc45f4
core/file_sys: Make RomFSReader an abstract interface
The original RomFSReader is renamed to DirectRomFSReader that directly reads the RomFS.
2020-02-07 15:19:53 +08:00
zhupengfei
05a82b15e6
swkbd: Fix digit filter
The DIGIT filter was incorrectly implemented as preventing all digits. It actually limits the maximum digit count to max_digits, according to ctrulib and hardware testing.
2020-02-04 16:56:30 +08:00
Tobias
eb0364dd5f
citra_qt: config: Move audio to its own tab. (#5079)
- We have some important audio settings, makes them more discoverable.

Co-Authored-By: bunnei <bunneidev@gmail.com>

Co-authored-by: bunnei <bunneidev@gmail.com>
2020-02-01 16:04:48 +01: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
Bartosz Kaszubowski
ff66f723bb GUI: fix minor issues with dark themes
GUI: rename and reorder themes
2020-01-28 14:24:52 +01:00
FearlessTobi
4b7a45ccc7 yuzu/main: Specify string conversions explicitly 2020-01-23 22:45:13 +01:00
James Rowe
5f20bf0e10
Merge pull request #5073 from vitor-k/log-shader-cache-option
Log disk shader cache setting
2020-01-22 21:25:17 -07:00
James Rowe
f3e6c4f841
Merge pull request #5071 from jroweboy/loading-bar
QT Frontend: Add disk shader loading progress bar
2020-01-22 21:24:43 -07:00
Vitor Kiguchi
2035207dde log disk shader cache setting 2020-01-23 00:49:17 -03:00
James Rowe
426e214c25 Loading Screen: Vertically Center everything 2020-01-22 17:26:27 -07:00
James Rowe
961a7b59c9 QT Frontend: Add disk shader loading progress bar
Until we get a on screen display or async shader loading, we should at
least have some measure of progress in the meantime. This is 90% a port
from the loading screen I made for yuzu, but with a slightly different
changed detection for when to display the ETA. Now we keep track of a
rolling estimate for shader load ETA and only display a ETA if its going
to take longer than 10 seconds.
2020-01-22 17:18:00 -07:00
James Rowe
5fb456f17f Frontend: Prevent DiskShader option from being selected if HW Shaders are disabled 2020-01-22 09:50:31 -07:00
James Rowe
bd29261e0a Frontend: Only load disk resources if hw shader is enabled 2020-01-22 09:47:53 -07:00
Vitor Kiguchi
b713fe3329 Address review comments 2020-01-22 12:51:04 -03:00
Vitor Kiguchi
157f82141d Make a separate function for getting minimum size based on layout 2020-01-21 19:31:39 -03:00
James Rowe
5fd1ff08d7
Merge pull request #5024 from jroweboy/temp-hle-audio-fix
Prevent out of memory errors when the game passes in an improper length value
2020-01-21 15:30:20 -07:00
Vitor Kiguchi
0dcb886ef2 clang format 2020-01-21 14:24:16 -03:00
Vitor Kiguchi
718f04af6d Correctly treat cases when current size is smaller than the minimum defined by the layout 2020-01-21 13:32:51 -03:00
Vitor Kiguchi
5d0353c391 correct ProcessConfigurationChanges 2020-01-20 23:00:33 -03:00
Vitor Kiguchi
6e1a873e57 use the defined constants instead of magic numbers for screen dimensions 2020-01-20 23:00:33 -03:00
Vitor Kiguchi
64737afdbc Change min_client_area_size based on layout 2020-01-20 23:00:21 -03:00
James Rowe
a0f9c795c8
Merge pull request #5043 from vitor-k/screen-rotate
Implement Upright/Book-style layout
2020-01-20 18:38:06 -07:00
Vitor Kiguchi
c2179a1dd0 log the upright screen setting 2020-01-20 22:32:16 -03:00
Vitor Kiguchi
5eb9a5b3bc Set hotkey for screen rotation 2020-01-20 22:32:15 -03:00
Vitor Kiguchi
be88d2a59a implement upright orientation for side and large frame layouts 2020-01-20 22:32:15 -03:00
vitor-k
89cab445d4 Implementation of screen rotation without use of additional layouts.
This is based on what was done using additional layouts, but modified
to have a variable to control rotation and making it so Single Screen
Layout behaves like Upright Single would, and Default Layout behaves
like Upright Double would, when the new variable is used.

Large Layout and Side Layout currently ignore the new variable.
New variable still currently doesn't have a hotkey.
2020-01-20 22:31:51 -03:00
bunnei
591c6a64d7 common: SPSCQueue: Notify after incrementing queue size. 2020-01-19 13:35:49 +01:00
TotalCaesar659
df6cf6bbb6 Add headbar icon on Linux 2020-01-19 13:29:53 +01:00
James Rowe
e4285097f4
Merge pull request #5021 from ccawley2011/cpu_detect
common/cpu_detect: Remove unused functionality
2020-01-17 20:30:29 -07:00
James Rowe
e74a402c69
Merge pull request #4923 from jroweboy/diskcachelul
Disk Shader Caching
2020-01-17 18:15:50 -07:00
iwubcode
43f8aadd52 renderer_opengl: Allow usage of interlaced 3D 2020-01-16 22:12:50 -06:00
iwubcode
6f269c375f citra, citra_qt, settings.h, default_ini.h: Add option for interlaced 3D 2020-01-16 22:12:50 -06:00
James Rowe
e95bc52b3d Only check for sanitize_mul if theres a shader in the cache 2020-01-16 08:35:52 -07:00
James Rowe
43c9695bf9 Fix title bar 2020-01-15 23:52:41 -07:00
James Rowe
cf4125a6a5 Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
James Rowe
6945b6539f Address review and update zstd 2020-01-15 19:58:34 -07:00
James Rowe
936094dd27 Log the number of entries in each cache 2020-01-15 19:58:34 -07:00
James Rowe
45bc5b465e Add a error log for unsupported configurations for disk cache 2020-01-15 19:58:34 -07:00
James Rowe
2d86bc6db5 Rename InvalidateTransferable to InvalidateAll to match what it does 2020-01-15 19:58:34 -07:00
James Rowe
7092ba8480 Only add shaders to precompiled cache if they are new 2020-01-15 19:58:34 -07:00
James Rowe
061a33477f Properly bind the shader sampler and uniform bindings 2020-01-15 19:58:34 -07:00
James Rowe
a20c81d593 Change VFS vector to regular vector 2020-01-15 19:58:34 -07:00
James Rowe
6f2756089d citra-sdl: Add Load Disk Resources 2020-01-15 19:58:34 -07:00
James Rowe
d418f0438d citra-qt: Load Disk Resources 2020-01-15 19:58:34 -07:00
James Rowe
d03d201482 Add GetRenderer to core 2020-01-15 19:58:34 -07:00
James Rowe
be52d3a7d0 Add missing changes from yuzu file_util 2020-01-15 19:58:34 -07:00
James Rowe
4e9ec4efd0 Add shader disk caching 2020-01-15 19:58:33 -07:00
James Rowe
ce3f8bf94e Add frontend settings 2020-01-15 19:58:33 -07:00
James Rowe
b5b6ce5fdc Add shader cache version generation 2020-01-15 19:58:33 -07:00
James Rowe
b5bc05738c Add settings for disk shader cache 2020-01-15 19:58:33 -07:00
James Rowe
8f67d6a444 Add ZSTD compression for precompiled cache 2020-01-15 19:58:33 -07:00
James Rowe
cd86c9b043
Merge pull request #5036 from leoetlino/bps
file_sys: Add support for BPS patching
2020-01-15 12:04:54 -07:00
James Rowe
45bff6ab58
Merge pull request #5033 from BreadFish64/fix_game_list
qt: do not use an invalid update smdh
2020-01-15 11:51:35 -07:00
James Rowe
01686f78fe
Merge pull request #5037 from leoetlino/thin-archives
CMake: Create thin archives on Linux
2020-01-01 14:29:43 -05:00
BreadFish64
b3beff0f4c common/logging: don't use regex for path trimming 2019-12-24 14:19:18 -06:00
Léo Lam
756d231ff9 file_sys: Add support for BPS patches
The BPS format allows distributing patches that are smaller and that do
not contain copyrighted content if data is relocated
(unlike non-trivial IPS patches).

This is essential for games such as MM3D that have three barely
different code revisions. Supporting all three versions would
demand an unreasonable amount of work; with BPS patches only one
version has to be supported.
2019-12-22 10:46:47 +01:00
Léo Lam
3140086c60 file_sys: Handle patch applying failures
This changes ApplyCodePatch to return a ResultStatus, which makes it
possible to determine whether patch applying has failed. Previously,
only a boolean was returned, and false was returned when no patch
was found OR when a patch was found but applying it failed.

This also changes AppLoader_NCCH to return an error if patching fails
because the executable is likely to be left in an inconsistent state
and we should not proceed booting in that case.
2019-12-22 10:46:47 +01:00
Léo Lam
1377be9902 file_sys: Move IPS patching code into separate source file
In anticipation of a new BPS patcher.
2019-12-22 10:46:47 +01:00
Léo Lam
72a081c617 CMake: Create thin archives on Linux
This significantly reduces unnecessary disk writes and space usage
when building Citra.

libcore.a is now only ~1MB rather than several hundred megabytes.
2019-12-22 10:12:00 +01:00
BreadFish64
cadfd6834d qt: do not use an invalid update smdh 2019-12-18 21:51:06 -06:00
James Rowe
020cd56ad8
Merge pull request #5030 from jroweboy/reorder-queue-acquire
Remove wait for free buffer
2019-12-18 16:07:52 -07:00
James Rowe
dd258acfaf
Merge pull request #5027 from jroweboy/ffmpeg-fix
Reenable AAC FFMPEG decoding
2019-12-17 08:49:35 -07:00
James Rowe
f9421eedcc
Merge pull request #5028 from jroweboy/missing-vsync-telemetry
Add missing vsync telemetry field
2019-12-17 08:49:08 -07:00
James Rowe
1d14b98f81 Remove accidentally pushed debugging logs (#5029) 2019-12-17 11:13:47 +01:00
James Rowe
f369196c9f Remove wait for free buffer
Previously we would first attempt to use any buffer that was free,
meaning whichever buffer has already been displayed. This has poor
interactions when the operating system throttles the update rate of the
window, so if there isn't any free buffers available, just reuse the
oldest frame instead.
2019-12-16 20:02:01 -07:00
James Rowe
b559d1a495 Add missing vsync telemetry field
Was removed as part of #4940 but readded again.
2019-12-16 19:30:28 -07:00
James Rowe
e53a2ac411 Reenable AAC FFMPEG decoding
Simple cut/paste issue where initialized is only set to true when the
emulation attempts to init the Binary Pipe, but we used it to test if
the FFMPEG decoder was valid and disabled it if it wasn't. Just return
the value of have_ffmpeg_dl instead so when dynamic loading is added
it'll still work.
2019-12-16 19:23:43 -07:00
James Rowe
439d550850
Merge pull request #4940 from jroweboy/presentation-thread
Split Presentation thread from Render thread
2019-12-15 20:25:34 -07:00
James Rowe
408e225048 Destroy GLWindow on exit to prevent issues closing the app while in fullscreen 2019-12-15 16:20:59 -07:00
James Rowe
36c5058d66 Reintroduce a vsync option for people with really bad drivers 2019-12-15 15:42:05 -07:00
James Rowe
87facaa2e2 Prevent out of memory errors when the game passes in an improper length value
HACK

In Luigi's Mansion Dark Moon in HLE audio, the game mysteriously passes
in an extremely large value for length, which without any checks, causes
HLE audio to allocate an extremely large buffer.

This value seemingly is caused by some other HLE audio feature is missing,
and Luigi's Mansion subtracts two values to get a length, without
checking for overflow first. This appears to be caused by an incorrect
HLE audio emulation, as its fixed entirely by only changing to LLE. As
such, further investigation is required, but in the meantime, completely
eating up our users RAM is unacceptable.
2019-12-14 18:18:59 -07:00
James Rowe
ddb7ead3e4
Merge pull request #5020 from jroweboy/dynamic-mf
Runtime Load MediaFoundation dlls on Windows
2019-12-14 10:13:54 -07:00
James Rowe
30dfe1fcb8 Use the correct register length for index_array
The index_array can't possible be 31 bits long as that would index
out of bounds memory. According to 3dbrew, this should be 28
2019-12-13 18:08:07 -07:00
Cameron Cawley
9a45d32a5f common/cpu_detect: Remove Common::CPUVendor
It's only used by telemetry, where the information it provides can be gained from the brand string.
2019-12-09 22:39:56 +00:00
Cameron Cawley
bc5ad137c0 common/cpu_detect: Remove unused functionality 2019-12-09 22:36:32 +00:00
James Rowe
337ac73915 Improve aac decoder selection 2019-12-08 16:18:39 -07:00
James Rowe
b395efe804 Dynamically load Media Foundation 2019-12-08 13:54:27 -07:00
James Rowe
65613cce81 Add microprofile scopes for presentation 2019-12-02 18:59:12 -07:00
James Rowe
9ae3eb4a30 Remove high dpi scaling flag as it needs more work first 2019-12-02 18:34:11 -07:00
zhupengfei
17ba846a3f
applets/swkbd: Remove text memory clearing
The text shared memory wasn't supposed to be cleared according to my comparison with the LLE swkbd. This can cause issues in certain games such as Harvest Moon.

A null terminator is added to the text copied to mark the end of the string.
2019-12-01 23:01:07 +08:00
James Rowe
866df2644b
Merge pull request #4982 from vvanelslande/mic-device
service/mic: actually use the specified device
2019-11-28 21:23:36 -07:00
James Rowe
de17fe31fb clang-format 2019-11-28 20:47:33 -07:00
James Rowe
ea40eb0994 Use the proper parent window
Fixes an issue where the touch point is incorrect in OpenGLWindow when the render
target is initialized for the first time with single window mode disabled.
2019-11-28 20:35:50 -07:00
James Rowe
123c0212ef Fix window resizing bug 2019-11-28 11:20:42 -07:00
James Rowe
782eae7f65 Fix drag and drop 2019-11-28 10:56:58 -07:00
James Rowe
15ed600c91
Merge pull request #4956 from vitor-k/game-sorting
Fixes to game list sorting
2019-11-20 09:48:08 -07:00
James Rowe
e6c7f84dc6
Merge pull request #4964 from citra-emu/wwylele-patch-1
unfold UNREACHABLE implementation for dumb compilers
2019-11-20 09:43:48 -07:00
Weiyi Wang
6d0189b4b1
Merge pull request #4992 from FearlessTobi/port-2513
yuzu/game_list&multiplayer: Specify string conversions explicitly
2019-11-20 10:45:21 -05:00
Weiyi Wang
85f2e577b5
Merge pull request #5006 from FearlessTobi/port-3123
Port yuzu-emu/yuzu#3123: "common/logging: Silence no return value warnings"
2019-11-20 10:34:47 -05:00
James Rowe
0acacc4e1a
Merge pull request #5002 from vvanelslande/username-fix
Fix moderation by room host in dedicated rooms
2019-11-19 23:51:21 -07:00
ReinUsesLisp
30be149f87 common/logging: Silence no return value warnings 2019-11-19 16:47:35 +01:00
BreadFish64
e38b4f6707 video_core: get rid of MSVC hack comment 2019-11-17 17:42:19 -06:00
vvanelslande
d16d34203a Fix moderation by room host in dedicated rooms 2019-11-17 09:59:54 -05:00
vvanelslande
e1e136d72f service/mic: actually use the specified device 2019-11-11 17:15:10 -05:00
Weiyi Wang
5fa71d425b
Merge pull request #4998 from vvanelslande/count
dedicated_room: fix crash (count != 0) when closing the room
2019-11-11 15:54:44 -05:00
Pengfei Zhu
060119d333
Merge pull request #4987 from vvanelslande/room-logging
network/room (server): add message/join/leave/kick/ban/unban/game name logging
2019-11-11 20:29:33 +08:00
Pengfei Zhu
1c6a8e995a
Merge pull request #4953 from vvanelslande/qt-ui-unused
citra_qt/main.ui: remove unused actions "Load Symbol Map..." and "Select Game Directory..."
2019-11-11 20:27:48 +08:00
Weiyi Wang
98c396f179
Merge pull request #4995 from vvanelslande/rename-profile
settings, configure_input: fix rename input profile
2019-11-10 21:25:01 -05:00
vvanelslande
bb48d2491d citra_qt/configuration: add missing Read/SaveUtilityValues 2019-11-10 19:26:03 -05:00
vvanelslande
62014e8f34 dedicated_room: fix crash (count != 0) when closing the room 2019-11-10 17:07:00 -05:00
vvanelslande
1f708e8bad settings, configure_input: fix rename input profile 2019-11-09 16:55:03 -05:00
James Rowe
86f203e6e8 Add missing key events and also try to glFinish after swapping 2019-11-09 13:12:30 -07:00
James Rowe
68052de8a0 Workaround Qt bug that causes events to forward to the parent incorrectly 2019-11-09 13:12:30 -07:00
James Rowe
586b8e8b46 Change from QOpenGLWidget to QWindow
While QOpenGLWidget sounds like a good idea, it has issues which are
harder to debug due to how Qt manages the context behind the scenes. We
could probably work around any of these issues over time, but its
probably easier to do it ourselves with a QWindow directly.

Plus using QWindow + createWindowContainer is the easiest to use
configuration for Qt + Vulkan so this is probably much better in the
long run.
2019-11-09 13:12:30 -07:00
James Rowe
66f5278f52 Delete core_context before shutting down SDL 2019-11-09 13:12:30 -07:00
James Rowe
29c12058c7 Add minimum window size back to citra-qt 2019-11-09 13:12:29 -07:00
James Rowe
26d828fb4c Prevent softlock on shutdown and various cleanup 2019-11-09 13:12:29 -07:00
James Rowe
9c32c0b98b Change from render to texture to render to renderbuffer 2019-11-09 13:12:29 -07:00
James Rowe
52d7676831 recreate mailbox to use a queue instead 2019-11-09 13:12:29 -07:00
James Rowe
ac90cd0378 Change Present to finish only after swap 2019-11-09 13:12:29 -07:00
James Rowe
6fff8e3921 Remove screen change detection since it breaks make changing screen. (Still need to test windows) 2019-11-09 13:12:29 -07:00
James Rowe
5d97e44279 Fix macOS pixel ratio detection 2019-11-09 13:12:29 -07:00
James Rowe
045eec282a rename GGLContext to just GLContext 2019-11-09 13:12:29 -07:00
James Rowe
db94c017bf Change to a constructor that exists in qt 5.9 2019-11-09 13:12:29 -07:00
James Rowe
3b14bb44b9 QOffscreensurface 2019-11-09 13:12:29 -07:00
James Rowe
8d17aa40fd Remove vsync setting 2019-11-09 13:12:26 -07:00
James Rowe
fcbe5e1acd Add a separate thread for rendering and add texture mailbox and shared context to SDL 2019-11-09 13:10:18 -07:00
James Rowe
91255b8802 Change Qt to use QOpenGLWidget and support shared context and texture mailbox 2019-11-09 13:10:18 -07:00
James Rowe
27d0fc64d0 Add texture mailbox support to opengl renderer. 2019-11-09 13:10:17 -07:00
James Rowe
c2e7903825 Split graphics out of EmuWindow in preparation of shared contexts 2019-11-09 13:10:17 -07:00
James Rowe
db7a627a2e Add scope acquire context to simplify MakeCurrent and DoneCurrent calls 2019-11-09 13:10:17 -07:00
Khangaroo
df99d98240 specify size of buffer and use openglstate in getteximageoes 2019-11-09 12:58:17 -07:00
khang06
a458155f99 texture dump hotkey (ctrl+d)
address more comments
2019-11-09 12:56:30 -07:00
Khangaroo
5450d4980d crash hotfix (no clang-format because on phone)
hotfix 2: check if the texture is custom before dumping

hotfix 4: fix custom texture conflict detection
2019-11-09 12:56:28 -07:00
Khangaroo
ae4aaf2fc1 nested folder support + refuse to load incompatibly sized textures + general cleanups 2019-11-09 12:56:27 -07:00
Khangaroo
8a98310a16 address more comments, fix dumping textures that already got dumped 2019-11-09 12:56:27 -07:00
Khangaroo
c2a32e942b address more comments 2019-11-09 12:56:27 -07:00
Khangaroo
3534ad0835 reorder graphics tab, move speed to general 2019-11-09 12:56:27 -07:00
Khangaroo
da83430a68 add enhancements tab files 2019-11-09 12:56:27 -07:00
Khangaroo
650fe6447d generate mipmaps (for now) 2019-11-09 12:56:27 -07:00
Khangaroo
f09489475a fix texture dumping on opengl es, create load folder if none exists if custom textures is enabled 2019-11-09 12:56:27 -07:00
Khangaroo
254f8a4643 fix inverted texture dump error message path 2019-11-09 12:56:27 -07:00
Khangaroo
8b881ac1fc fix preload textures being enabled when it shouldn't
address more comments
2019-11-09 12:56:25 -07:00
Khangaroo
391e552927 qimageinterface fixes, remove old lodepng, address more comments 2019-11-09 12:56:24 -07:00
Khangaroo
b81c15941e add image interface, remove lodepng from video_core/core, address more comments, fix comments
remove unnecessary conversion
2019-11-09 12:56:21 -07:00
Khangaroo
5940361b81 new-line that clang-format didn't fix
address some comments
2019-11-09 12:56:17 -07:00
Khangaroo
59b475a4b9 implement custom texture preload 2019-11-09 12:56:17 -07:00
Khangaroo
657a129b60 handle upscaling and offsets (fixes oot3d) 2019-11-09 12:54:43 -07:00
Khangaroo
6d90c42a79 fix crashes, add custom texture cache, load textures from load directory 2019-11-09 12:54:40 -07:00
Khangaroo
f866b2a917 texture replacement (also messy) 2019-11-09 12:53:16 -07:00
khang06
deff865ac9 initial sloppy texture dumping implementation (opengl only) 2019-11-09 12:53:16 -07:00
khang06
94b3c63bf9 add dump dir to user paths 2019-11-09 12:53:16 -07:00
khang06
e0d63bd21b add texture dumping as a config entry 2019-11-09 12:53:12 -07:00
khang06
2b92065d2a add lodepng as an external, have video_core depend on it 2019-11-09 12:48:23 -07:00
James Rowe
926902cc5e
Merge pull request #4993 from bunnei/web-token-b64
citra_qt: configure_web: Use Base64 encoded token
2019-11-09 12:45:11 -07:00
bunnei
a1544d8669 dedicated_room: Support single Base64 token. 2019-11-09 13:48:26 -05:00
bunnei
3a18039c53 citra_qt: configure_web: Use Base64 encoded token for simplifying user experience. 2019-11-09 13:48:26 -05:00
Weiyi Wang
34c6b7ca48
Merge pull request #4985 from FearlessTobi/port-2942
Port yuzu-emu/yuzu#2942: "Silence miscellaneous warnings"
2019-11-08 23:42:32 -05:00
FearlessTobi
9c1535621a citra_qt/game_list: Specify string conversions explicitly 2019-11-09 02:46:23 +01:00
FearlessTobi
6cf0043830 citra_qt/updater: Specify string conversions explicitly 2019-11-09 02:46:07 +01:00
FearlessTobi
8f29ab3ceb citra_qt/multiplayer: Specify string conversions explicitly 2019-11-09 02:45:47 +01:00
Tobias
ff931590b0
configuration/config: Move config loading and saving to functions based off groups (#4855)
Over time our config values have grown quite numerous in size.
Unfortunately it also makes the single functions we have for loading and
saving values more error prone.

For example, we were loading the core settings twice when they only
should have been loaded once. In another section, a variable was
shadowing another variable used to load settings from a completely
different section.

Finally, in one other case, there was an extraneous endGroup() call used
that didn't need to be done. This was essentially dead code and also a
bug waiting to happen.

This separates the section loading code into its own separate functions.
This keeps variables only visible to the code that actually needs it,
and makes it much easier to visually see the end of each individual
configuration group. It also makes it much easier to visually catch bugs
during code review.

While we're at it, this also uses QStringLiteral instead of raw string
literals, which both avoids constructing a lot of QString instances, but
also makes it much easier to disable implicit ASCII to QString and
vice-versa in the future via setting QT_NO_CAST_FROM_ASCII and
QT_NO_CAST_TO_ASCII as compilation flags.
2019-11-07 17:33:41 +01:00
vvanelslande
db1b0a1964 network/room: add message/join/leave/kick/ban/unban/game name logging 2019-11-03 09:55:38 -05:00
FearlessTobi
5e98835b5f yuzu/game_list: Silence -Wswitch
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2019-11-02 18:56:23 +01:00
FearlessTobi
5d1d0b3693 yuzu/game_list_worker: Silence warnings
Co-Authored-By: Rodrigo Locatti <reinuseslisp@airmail.cc>
2019-11-02 18:55:08 +01:00
vvanelslande
44611c9985 citra_qt/main.ui: remove unused actions "Load Symbol Map..." and "Select Game Directory..."
Self-explanatory.
2019-10-25 20:13:35 -05:00
vitor-k
cc9bcf3e48 fix uppercase sorting 2019-10-25 18:49:13 -03:00
Weiyi Wang
e1fbf90e16
fix clang-format and lambda capture 2019-10-05 10:54:07 -04:00
Weiyi Wang
35690e3ac7
Merge pull request #4948 from vvanelslande/amiibo-dad
citra_qt: add amiibo drag and drop support
2019-10-05 10:47:46 -04:00
Weiyi Wang
00b9cdaf95
unfold UNREACHABLE implementation for dumb compilers
We relies on UNREACHABLE's noreturn attribute to eliminate parent's "no return value" warning. However, this was wrapped in a `if(!false)` block, which compilers may not unfold to recognize the noreturn nature.
2019-10-05 10:45:01 -04:00
vitor-k
eb7527254f Sort game items after the list is populated 2019-09-28 15:57:26 -03:00
vitor-k
476dcb1915 Use the displayed text for sorting GameListItemPath.
By default, DisplayRole is used as the SortRole.
This behaviour is what's expected by the user.
Made it so that an access to SortRole is equivalent to one to DisplayRole.
Also fixes a bug with directory sorting.
2019-09-28 00:48:11 -03:00
FearlessTobi
1e93f568b5 Address review comments 2019-09-22 20:48:32 +02:00
FearlessTobi
a5d880979c Backport changes from yuzu-emu/yuzu#2057 2019-09-22 17:47:18 +02:00
FearlessTobi
0a3f75c25f Backport changes from yuzu-emu/yuzu#2806 2019-09-22 17:40:04 +02:00
FearlessTobi
029cc77c4b Backport changes from yuzu-emu/yuzu#2444 2019-09-22 17:27:01 +02:00
James Rowe
05240770e0
Merge pull request #4946 from vvanelslande/ipc-recorder-fix-ok
citra_qt/RecordDialog: close when OK is clicked
2019-09-22 01:44:33 -06:00
vvanelslande
a650402eb5 citra_qt/RecordDialog: close when OK is clicked
The OK button didn't do anything before.
2019-09-21 23:56:07 -05:00
James Rowe
7152f4c748 Add FPS to SDL title bar
Also fix a small issue with incorrect shutdown ordering in SDL.
Previously the system would still be running so the telemetry task
didn't launch and detached_tasks would assert(count == 0)
2019-09-21 22:10:24 -06:00
vvanelslande
07eb89c6ee citra_qt: add amiibo drag and drop support 2019-09-21 17:08:19 -05:00
James Rowe
223bfc9a2a
Merge pull request #4847 from zhaowenlan1779/ipc-debugger
core, citra_qt: IPC Recorder
2019-09-21 00:04:07 -06:00
Pat
63c31af8ee Added Host CPU and OS to log 2019-09-20 20:34:01 -06:00
Weiyi Wang
377abfa3e6
Merge pull request #4930 from vitor-k/pause-on-unfocus
Pause when in background
2019-09-20 14:51:01 -04:00
Weiyi Wang
176b8b4a0b
Merge pull request #4917 from vitor-k/long-title
Allow displaying the long_title of the game
2019-09-20 12:59:04 -04:00
vitor-k
8d8bc8fee7 small changes to ApplicationState handling, just in case 2019-09-19 00:12:36 -03:00
James Rowe
c1d3b5e61c
Merge pull request #4934 from vitor-k/boost_remnant
Remove boost headers not currently used
2019-09-18 10:57:37 -06:00
James Rowe
4b05078def
Merge pull request #4922 from Steveice10/master
Filter non-executable files out of the game list.
2019-09-16 23:51:44 -06:00
BreadFish64
d0decf2166 remove ugly msvc hack
the bug appears to be fixed so there's no reason to keep this around
2019-09-15 22:35:21 -05:00
vitor-k
147a7f0dec Remove boost headers not currently used 2019-09-15 15:18:38 -03:00
vitor-k
bb12af1da7 Remove unused boost header 2019-09-15 14:00:55 -03:00
vitor-k
05b1cfc63b Pause in background guard clause and unused flag 2019-09-15 01:08:12 -03:00
vitor-k
66b1e419c3 Naming changes and clang format 2019-09-14 18:14:23 -03:00
Pengfei Zhu
360e6cb513
Merge pull request #4900 from leoetlino/exheader-fix
ncch_container: Fix NCCH decryption heuristic when replacing exheader
2019-09-14 10:33:06 -05:00
vitor-k
356fd60520 Add option to enable pause when on background 2019-09-13 23:01:12 -03:00
Pengfei Zhu
22d3099ea2
Merge pull request #4925 from vitor-k/icon-style
Change the coding style of GameListIconSize bounds check to use the enum
2019-09-13 23:20:45 +08:00
James Rowe
7bfd829c77
Merge pull request #4893 from wwylele/nfc-state
NFC: extract frontend-facing tag state
2019-09-13 08:59:51 -06:00
vitor-k
7224ec57f6 Only auto unpause when auto paused 2019-09-11 21:53:26 -03:00
vitor-k
23405b4ce1 Pause on unfocused first draft
This is a MVP, still needs one or more configuration option(s) and
review of the code style.
2019-09-10 21:52:17 -03:00
Vitor K
4d2fee31b3
Prevent repetition on config.cpp
Type is already indicated on right hand side.

Co-Authored-By: Mat M. <mathew1800@gmail.com>
2019-09-10 00:01:55 -03:00
vitor-k
966d128025 Remove newlines from the long title in row2 2019-09-09 23:40:32 -03:00
vitor-k
719912786a UISettings::GameListText
Append a value to the enum to function as length counter.
Also remove magic numbers where possible, by using the enum instead.
2019-09-09 23:36:21 -03:00
vitor-k
1f1ac98f10 Fix clang format for long-title 2019-09-09 23:36:21 -03:00
vitor-k
c866a8e428 Change GameListText order to improve configuration compatibility 2019-09-09 23:36:21 -03:00
vitor-k
f9cded05fd Allow displaying of the full title in the interface, as well as use the full title in the search filter 2019-09-09 23:36:21 -03:00
James Rowe
d6f2bc8c04
Merge pull request #4896 from zhaowenlan1779/game-list-fix-3
citra_qt: Misc game list updates/fixes
2019-09-09 20:04:04 -06:00
vitor-k
ccf6d380af Change the coding style of GameListIconSize bounds check to use the enum instead of magic numbers 2019-09-08 19:37:55 -03:00
Steveice10
5cf684c951 Filter non-executable files out of the game list. 2019-09-08 14:19:11 -07:00
Weiyi Wang
24ec11f928
Merge pull request #4915 from FearlessTobi/port-2818
Port citra-emu/citra#2818: "externals: update fmt to 6.0.0"
2019-09-08 08:42:02 -04:00
Pengfei Zhu
4bc22aa350
Merge pull request #4918 from vitor-k/warnings
Silence warnings from unused code and mismatched declaration
2019-09-06 22:08:06 +08:00
vitor-k
61f9710d95 remove unused call to nodiscard function 2019-09-05 17:11:38 -03:00
Ethan
56091241ff externals: update fmt to 6.0.0 2019-09-05 02:39:13 +02:00
James Rowe
8c2a33553a
Merge pull request #4914 from vitor-k/windows-coffee
Fix to Windows sleep issues
2019-09-03 14:25:58 -06:00
Weiyi Wang
42d3d563b9
Merge pull request #4897 from zhaowenlan1779/warning-core-timing
core_timing: Silence sign comparison warnings
2019-09-03 16:06:27 -04:00
vitor-k
50cee98bca Move the SetThreadExecutionState calls to their own separate functions 2019-09-03 16:13:14 -03:00
vitor-k
bcf33b0ac6 Fix to windows sleep issues, now with clang format! 2019-09-03 11:06:57 -03:00
vitor-k
6e3652d15b Struct vs class declaration and unused variable 2019-09-02 22:45:38 -03:00
James Rowe
8acd2b966d
Merge pull request #4894 from wwylele/remove-gs
opengl: remove hw geometry shader related stuff
2019-09-02 09:38:05 -06:00
Pengfei Zhu
285b2b3207
Merge pull request #4906 from vvanelslande/hotkey-and-fullscreen-fixes
citra_qt: fix the stuck in fullscreen mode and hotkey bugs
2019-09-01 23:00:46 +08:00
Pengfei Zhu
05a07f944b
Merge pull request #4911 from vitor-k/master
Add a cancel option to analog stick configuration
2019-09-01 21:50:10 +08:00
vitor-k
ac3a854f45 Add cancel option to analog stick configuration 2019-08-31 21:58:07 -03:00
Valentin Vanelslande
2959b002cd applet_manager: remove the "we are going to disable loading LLE applets before further fixes are done" comments
LLE Applets are enabled again in #4500, but @wwylele didn't remove these comments.
2019-08-29 20:41:16 -05:00
vvanelslande
1ff418de4a citra_qt: fix the stuck in fullscreen mode and hotkey bugs
The stuck in fullscreen mode bug happens if the emulated program exits, is fixed by adding [this](https://github.com/citra-emu/citra/compare/master...vvanelslande:hotkey-and-fullscreen-fixes?expand=1#diff-5e8bf22f5c3b3579c402308dd96b7563R888-R894), steps to reproduce:
- Start [FBI](https://github.com/Steveice10/FBI)
- Press START

The fixed hotkeys (I changed them to use [connect](https://doc.qt.io/qt-5/qobject.html#connect) instead of [setShortcut](https://doc.qt.io/qt-5/qaction.html#shortcut-prop) + [setShortcutContext](https://doc.qt.io/qt-5/qaction.html#shortcutContext-prop)) are:
- Load File (was not working in windowed mode), fixed by removing the [setShortcut](https://doc.qt.io/qt-5/qaction.html#shortcut-prop) + [setShortcutContext](https://doc.qt.io/qt-5/qaction.html#shortcutContext-prop) calls (there was already a [connect](https://doc.qt.io/qt-5/qobject.html#connect) call)
- Stop Emulation (was not working in fullscreen mode), fixed with the [connect](https://doc.qt.io/qt-5/qobject.html#connect) change and [this](https://github.com/citra-emu/citra/compare/master...vvanelslande:hotkey-and-fullscreen-fixes?expand=1#diff-5e8bf22f5c3b3579c402308dd96b7563R888-R894) change
- Exit Citra (was not working in fullscreen mode), fixed with the [connect](https://doc.qt.io/qt-5/qobject.html#connect) change

Fixes #4876
2019-08-29 19:50:05 -05:00
zhupengfei
3d14abeb41
citra_qt/record_dialog: Switch to QFormLayout 2019-08-29 00:03:56 +08:00
Léo Lam
7318913f5a ncch_container: Fix NCCH decryption heuristic when replacing exheader
Fixes a regression from #4862, which caused the NCCH title ID checking
heuristic to be skipped whenever the exheader is replaced.

I was thinking the heuristic wouldn't be needed in that case, but it
turns out that many users still have pathological NCCHs that indicate
they are encrypted but are actually decrypted...

Now the original exheader is always read and used for the heuristic
to determine whether the NCCH is actually encrypted; only then do we
load a replacement exheader (if it exists) to avoid affecting the
heuristic.
2019-08-22 17:52:30 +08:00
Pengfei Zhu
8fa6be5b15
Merge pull request #4898 from zhaowenlan1779/warning-room-member
network/room_member: Silence -Wswitch warning
2019-08-21 09:14:28 +08:00
zhupengfei
ebc43239f0
core_timing: Silence sign comparison warnings
This is causing a lot of warnings all over the place.
2019-08-20 22:25:18 +08:00
zhupengfei
698b471074
network/room_member: Silence -Wswitch warning
This causes lots of warnings. Adding the Uninitialized case solves this
2019-08-20 22:23:32 +08:00
zhupengfei
531bf857f5
Remove old region free logic 2019-08-20 21:03:41 +08:00
zhupengfei
4144f4480d
citra_qt: Add single line mode for game list
This single line mode is aimed at restoring the intended behavior with Small or None icons. Line breaks will be replaced with commas (Region row) or spaces (Name row). One can toggle this option in UI configuration.
2019-08-20 20:03:15 +08:00
zhupengfei
b078122167
citra_qt/game_list: Disable uniform row heights
This option was intended for enabling optimizations when all rows are granted to have the same height. In our case this is not true, and therefore the behavior is actually undefined. Different versions of Qt handle this differently. Newer versions of Qt tend to hide contents that are too big in height, which goes against our wishes. Thus, it's probably the best to disable this option so that things don't go wrong if we ever decide to update Qt.
2019-08-20 20:01:14 +08:00
zhupengfei
82fea86717
citra_qt/game_list: Add an All Regions check
Some titles (mostly homebrews) do not use the region free value 0x7FFF but instead set all of the region flags, resulting in all regions displayed in game list, which is not beautiful and not what we want. This fixes it by adding an all_regions check.
2019-08-20 19:57:33 +08:00
zhupengfei
ce3459192e
fixup! CMake: separate options for FFmpeg decoder/dumper 2019-08-20 14:58:43 +08:00
zhupengfei
f8b3950829
CMake: separate options for FFmpeg decoder/dumper
Separate options are now provided for FFmpeg AAC audio decoder and FFmpeg video dumper. This allows users to configure Citra with greater freedom.

Also, previously for Linux builds, AAC decoder is accidentally enabled along with the dumper, which could potentially cause patent issues (?). This commit fixes it by only enabling video dumper.
2019-08-20 14:45:39 +08:00
zhupengfei
42cefdbff0 citra_qt/debugger: Add recorder widget
This widget provides a simple list of recorded requests as well as a simple filter and the 'Clear' button. Requests with status 'HLE Unimplemented' or 'Error' will be marked out with the red color.

This widget handles retrival of service name. For reasons refer to a previous commit message.

Added the widget to the Debugging menu, pretty much the same as other debugging widgets.
2019-08-20 03:08:55 +08:00
zhupengfei
45930e0621 citra_qt: Add record dialog
This 'View Record' dialog shows all relevant information on a record as well as the command buffers.
2019-08-20 03:08:20 +08:00
zhupengfei
f40232adc9
service/sm: Add service name retrival based on client port ID
This is for displaying the service names. This function is only used in the frontend, because Recorder which is in the Kernel cannot and should not have access to SM in the System.
2019-08-20 03:07:30 +08:00
zhupengfei
efd69e1315
kernel, service: Add HLE request/reply recording
Pretty much the same as LLE requests, the 'translate' part is chosen. A function is added to the context class to record requests that involves unimplemented HLE functions.
2019-08-20 03:07:29 +08:00
zhupengfei
a27dfc269a
kernel: Add LLE request/reply recording
The 'translate' function is a great place to put this in IMO as it is possible to get both untranslated and translated cmdbufs. However a kernel reference has to be passed here, but it is not too hard fortunately.
2019-08-20 03:07:29 +08:00
zhupengfei
cb0bd6530c
kernel/svc: Add request registering
All necessary objects are available here, making this a great place for the registering part.
2019-08-20 03:07:27 +08:00
zhupengfei
b093d39a27
kernel: Add IPC Recorder to KernelSystem
Refer to the previous commit message for reasons why this is in kernel.
2019-08-20 03:07:26 +08:00
zhupengfei
a3057c968b
kernel: Add IPC Recorder class
This class resides in Kernel mainly because that, it's hard for kernel objects to get references to the System (and therefore to the Recorder), while much easier for KernelSystem. If this is to be moved to System the code will likely get much more complex with System (or Recorder) references passed everywhere.
2019-08-20 03:07:25 +08:00
zhupengfei
71e0c40310
service: Add service function name lookup based on header code
This is for displaying the function name for HLE requests. Probably it is possible to do the same for LLE ones but it would require having the HLE handlers available even when not using them, which doesn't seem to make sense and is more of a hack than a proper solution in my opinion.
2019-08-20 03:07:25 +08:00
Weiyi Wang
dd3ba7bd21 opengl: remove hw geometry shader related stuff 2019-08-18 20:07:50 -04:00
Weiyi Wang
b4d45b57c7
Merge pull request #4879 from tywald/accurate-gs-on
Remove 'Accurate Geometry Shader' setting
2019-08-18 15:52:45 -04:00
Weiyi Wang
24f1c8d009
Merge pull request #4885 from vvanelslande/cmake-dwarf-mingw
Add MinGW CMake option to disable DWARF debugging information
2019-08-18 15:40:32 -04:00
Weiyi Wang
8b8111b425 NFC: extract frontend-facing tag state
Added a new state amiibo_in_range. This state is akin to the real world
physical relationship between a 3DS machine and an amiibo, which is
independent from the service state (or even the machine is powered on or
not). The service state nfc_tag_state is then synchronized with this
physical state on every potential point when the state changes. This
solves the issue where user might load an amiibo before NFC service
initializes, or remove an amiibo after NFC service shutdown, which
previously causes inconsistent state change.

Also removed std::atomic on nfc_tag_state, because
1. It is already protected by g_hle_lock
2. It wasn't properly used in the code anyway. For example, there are
many double loading on this variable, which effectively make it
non-atomic.
2019-08-17 21:56:12 -04:00
James Rowe
0cffab04b5 Fixup! Prevent issue deleting PerfStats 2019-08-16 21:54:33 -06:00
James Rowe
6f0b009497
Merge pull request #4889 from jroweboy/autouic
Remove qt5_wrap_ui macro usage
2019-08-16 19:36:23 -06:00
James Rowe
7fe9a094a5 Remove qt5_wrap_ui macro usage 2019-08-16 19:35:37 -06:00
James Rowe
00eeaf0e9c
Merge pull request #4882 from jroweboy/frametime-logging
Frametime logging for tracking performance over time
2019-08-16 19:33:53 -06:00
James Rowe
135b054f74
Update telemetry_session.cpp
Change Session -> Performance
2019-08-15 19:36:02 -06:00
James Rowe
331a9fc12b Change over to std::shared_ptr 2019-08-14 21:30:49 -06:00
James Rowe
61ebeca765 NS: Lowercase NS:S to ns:s like it should be 2019-08-14 21:23:06 -06:00
James Rowe
6c8faaf2c2 HLE: Remove BaseInterface and add ns.cpp back 2019-08-14 21:23:06 -06:00
James Rowe
f2167d76a8 Service: Add BaseInterface and NSInterface 2019-08-14 21:23:03 -06:00
James Rowe
b62ca12e88 HLE: Move NS:S into APT and remove NS 2019-08-14 21:21:33 -06:00
James Rowe
a77cd00cbe Add current date/time to file path 2019-08-14 21:17:32 -06:00
James Rowe
23e969dfdc Address review comments 2019-08-14 21:17:32 -06:00
James Rowe
45be693f8c Add telemetry field for mean frametime
Previously, telemetry results couldn't give a good estimate for
performance over time, because it didn't include any fields related to
performance. With this, devs should be able to query metabase for mean
frametime to check for performance regressions after a change is made.
2019-08-14 21:17:31 -06:00
James Rowe
62e6c147ae Add perf stat logging through ini setting
For better tracking of performance regressions on incoming changes, this
change adds a way to dump frametime to file by changing an ini config
option. This is intentionally hidden as its only useful to a small
number of individuals, and not really applicable to the general
userbase.
2019-08-14 21:17:27 -06:00
James Rowe
84b40f2da6
Merge pull request #4862 from leoetlino/exheader-override-fix
ncch_container: Assume override exheaders are decrypted
2019-08-14 09:31:54 -06:00
vvanelslande
1437c4a01a Add MinGW CMake option to disable DWARF debugging information
Also, I disabled it for the Linux MinGW build.
2019-08-14 10:29:04 -05:00
James Rowe
e18c7ee78f
Merge pull request #4602 from zhaowenlan1779/video-dump-reborn
Implement dumping audio+video to video files
2019-08-14 09:12:14 -06:00
zhupengfei
8202c55cd5
citra_qt: Add video dumping UI
QtConcurrent is used to stop the video dumping in another thread.
2019-08-14 09:27:05 +08:00
zhupengfei
526d53af99
citra: Add --dump-video argument 2019-08-14 09:27:05 +08:00
zhupengfei
399a660faa
core/dumping: Add FFmpeg implementation
Sorry for the large diff, the implementation is quite long, and I can't really find a good way to split it into commits.
2019-08-14 09:27:04 +08:00
zhupengfei
cf2c354fb9
CMake, CI: Add FFmpeg library dependency 2019-08-14 09:27:03 +08:00
Weiyi Wang
50ab002072
Guard unistd.h with MacOS only macro
Fix compile error on Windows caused by #4877 
Weird, I thought I saw this guard during the code review...
2019-08-13 15:42:22 -04:00
zhupengfei
0224ae13c4
video_core: Implement frame dumping
Two PBOs are used to speed up pixel copying process. To avoid getting the wrong speed/FPS, a new parameter is added to DrawScreens about whether to increase the frame count.
2019-08-13 19:28:04 +08:00
zhupengfei
778cc68114
renderer_base: Add prepare/cleanup function interface
This should be called by the video dumper backend to tell the video core to create necessary buffers/storage, etc.
2019-08-13 19:28:04 +08:00
zhupengfei
fff570012f
audio_core: Dump audio frames and samples
This is tested to work with all three current methods - HLE, LLE and multithread LLE.
2019-08-13 19:28:03 +08:00
zhupengfei
f2880b08d1
core: Add VideoDumper to System 2019-08-13 19:28:02 +08:00
zhupengfei
3f64aaabbd
core: Add video dumper interface
The VideoFrame is rotated while copying, to put the pixels in their correct positions (OpenGL seems to return the image in reverted order by default)
2019-08-13 19:28:02 +08:00
James Rowe
2f0ea48da4
Merge pull request #4878 from B3n30/citra_qt_all_regions_game_list
Citra_qt: Display all valid regions in game_list
2019-08-12 23:07:27 -06:00
James Rowe
bc945fefec
Merge pull request #4877 from B3n30/fix_user_dir_on_osx
citra_qt: on osx chdir to bundle dir to allow detection of user folder
2019-08-12 22:59:05 -06:00
tywald
aad8261534 Remove 'Accurate Geometry Shader' setting, default behavior is as it was turned on. 2019-08-12 02:55:14 +02:00
B3n30
e454f4c05b proper translation part2 2019-08-11 16:51:46 +02:00
B3n30
ec4fb81c4b proper translation 2019-08-11 16:22:43 +02:00
B3n30
69b32f174c clang-format 2019-08-11 14:44:31 +02:00
B3n30
848bfaf8cb Dispaly all valid game regions 2019-08-11 13:52:08 +02:00
B3n30
aabc2144bf Merge branch 'patch-1' of https://github.com/Jhynjhiruu/citra into Jhynjhiruu-patch-1 2019-08-11 13:21:16 +02:00
B3n30
3fb622e84f citrq_qt:main.cpp include unistd.h 2019-08-11 13:04:51 +02:00
B3n30
42d0654eec citra_qt: on osx chdir to bundle dir to allow detection of user folder 2019-08-11 12:28:07 +02:00
Weiyi Wang
d18d2a0a18 citra_qt/configure: move speed limiter to general (#4864)
The speed limiter being a frame limiter is an implmentation detail and can be changed in the future. What user care about is that it limit the emulation speed in genenral (not just graphics but also audio+input)
2019-08-10 11:13:17 +02:00
Hamish Milne
e3cefe5a5d Use a clear texture instead of texture 0 (solid black) in the GL rasterizer (#4844)
* Add OpenGLState.default_texture and set it to Clear in OpenGLRasterizer

* Localize the fix to the GL rasterizer

* Revert unwanted change
2019-08-10 11:05:00 +02:00
Tobias
d80edd99d7 Port yuzu-emu/yuzu#2457: "yuzu/{about_dialog, main}: Specify string conversions explicitly for SCM-related info" (#4774)
* yuzu/about_dialog: Specify string conversions explicitly

Specifies the conversions explicitly to avoid implicit conversions from
const char* to QString. This makes it easier to disable implicit QString
conversions in the future.

In this case, the implicit conversion was technically wrong as well. The
implicit conversion treats the input strings as ASCII characters. This
would result in an incorrect conversion being performed in the rare case
a branch name was created with a non-ASCII Unicode character, likely
resulting in junk being displayed.

* yuzu/main: Move window title updating logic to its own function

For similar reasons to the previous change, we move this to a single
function, so we don't need to duplicate the conversion logic in several
places within main.cpp.
2019-08-10 11:01:18 +02:00
Weiyi Wang
0269cb6e67 gl_rasterizer: decrease vertex buffer size (#4703)
Nvidia seems to have flickering issue with pokemon for some specific vertex buffer size. The root cause is still unknown. This is just a workaround
2019-08-10 10:51:24 +02:00
Weiyi Wang
88db89bf57 configure_dialog: reverse tab map to avoid logic based on user-facing/translatable text (#4866) 2019-08-10 09:00:56 +02:00
xperia64
8131bd32e3 renderer_opengl: Add support for custom shaders (#4578)
* Add Anaglyph 3D

Change 3D slider in-game

Change shaders while game is running

Move shader loading into function

Disable 3D slider setting when stereoscopy is off

The rest of the shaders

Address review issues

Documentation and minor fixups

Forgot clang-format

Fix shader release on SDL2-software rendering

Remove unnecessary state changes

Respect 3D factor setting regardless of stereoscopic rendering

Improve shader resolution passing

Minor setting-related improvements

Add option to toggle texture filtering

Rebase fixes

* One final clang-format

* Fix OpenGL problems
2019-08-09 20:00:47 +02:00
Weiyi Wang
3e9c2e77d9
Merge pull request #4859 from weihuoya/opengles
minor fix for opengles
2019-08-08 09:30:42 -04:00
Léo Lam
a2cde6e075 ncch_container: Assume override exheaders are decrypted
Require and assume that override exheaders are decrypted for
consistency with Luma's loader behaviour and to ensure consistent
behaviour regardless of whether the NCCH is marked as encrypted or not.
Currently, exheader overriding with an encrypted NCCH would cause
the title ID checking heuristic to mistakenly disable encryption,
which would then make exefs loading fail.
2019-08-07 18:41:37 +08:00
Tobias
76aec4d675 [Hotfix] Revert change in configure_dialog (#4865) 2019-07-29 12:33:10 +02:00
Weiyi Wang
216fc0b546
Merge pull request #4856 from FearlessTobi/port-2492
Port yuzu-emu/yuzu#2492: "yuzu/debugger: Specify string conversions explicitly"
2019-07-29 00:21:51 -04:00
Weiyi Wang
c9d4a13c5c
Merge pull request #4860 from FearlessTobi/port-2499
Port yuzu-emu/yuzu#2499: "yuzu/configuration: Specify string conversions explicitly"
2019-07-29 00:21:21 -04:00
weihuoya
899e3eb003 minor fix for opengles 2019-07-28 21:18:38 +08:00
Lioncash
4832b29d3d yuzu/debugger: Specify string conversions explicitly 2019-07-28 15:13:03 +02:00
Lioncash
64a154e890 yuzu/configuration: Specify string conversions explicitly 2019-07-28 15:08:54 +02:00
Lioncash
e58a805a22 yuzu/configuration/config: Specify string conversions explicitly
Allows the configuration code to build successfully with implicit string
conversions disabled.

Also makes default_hotkeys internally linked:
Given the array is a private static array, we can just make it
internally linked to hide it from external code. This also allows us to
remove an inclusion within the header.
2019-07-25 23:34:29 +02:00
Pengfei Zhu
45ff10c9a0
Merge pull request #4852 from rerpha/compiler_warnings_room_member
Added default case for GetErrorStr, removed useless const declaration in header
2019-07-25 08:41:03 +08:00
James Rowe
aef06df388
Merge pull request #4817 from leoetlino/ips-patch-later
ncch_container: Apply IPS patch after allocating .bss
2019-07-23 20:58:35 -06:00
Jack Harper
cb455fd410 Added default case for GetErrorStr, removed useless const declaration in header 2019-07-23 23:24:38 +01:00
Jack Harper
b065ac6995 Fixing some compiler warnings 2019-07-23 23:10:17 +01:00
Silent
4fd22c6a14
Qt: Fixed behaviour of buttons by connecting functors to correct signals
Following screens got fixes:
- Cheats
- Configure/Debug
- Configure/Input
- Chat Room
- Direct Connect
- Host
- Lobby List
2019-07-22 23:28:10 +02:00
Jhynjhiruu
e201d44aa9
It's supposed to be OR, not AND! 2019-07-21 11:31:07 +01:00
Jhynjhiruu
834a487388
Fix build issue
Co-Authored-By: Ben <bene_thomas@web.de>
2019-07-21 10:51:59 +01:00
Jhynjhiruu
3f49d9920c
Fix whitespace 2019-07-21 10:39:20 +01:00
Jhynjhiruu
17ba67c8c9
Remove magic number 2019-07-21 10:37:29 +01:00
Jhynjhiruu
fb16700fe5
Update smdh.cpp 2019-07-21 00:36:04 +01:00
Weiyi Wang
909d04ddea Remove unused stuff
Some unused variables are still kept in services, as they are parameters passed from the command buffer and might be used in the future
2019-07-16 20:27:03 -04:00
Pengfei Zhu
643a396383
Merge pull request #4841 from citra-emu/wwylele-patch-1
citra_qt/configure_motion_touch: fix slot name
2019-07-15 12:04:25 +08:00
Pengfei Zhu
fb8adcc08c
Merge pull request #4839 from wwylele/ipc-sign
ipc_helpers: silent signed comparison warning
2019-07-15 12:03:31 +08:00
Pengfei Zhu
c6705d6958
Merge pull request #4838 from wwylele/kernel-reorder
kernel: silence -Wreorder
2019-07-15 12:03:00 +08:00
Pengfei Zhu
8ece20007a
Merge pull request #4837 from wwylele/interpreter
interpreter: silent sign warnings
2019-07-15 12:02:24 +08:00
Weiyi Wang
1904da775e
citra_qt/configure_motion_touch: fix slot name
Fixes #4840, hopefully
2019-07-14 23:02:22 -04:00
Pengfei Zhu
1d6c6a37a1
Merge pull request #4836 from wwylele/chatroom-sign
citra_qt: silent sign comparison warning
2019-07-15 07:33:35 +08:00
Pengfei Zhu
f31dd06d91
Merge pull request #4835 from wwylele/profiler-par
citra_qt/profiler: add parenthesis to silent warning
2019-07-15 07:32:39 +08:00
Pengfei Zhu
b27a9e1710
Merge pull request #4834 from wwylele/cubeb-sign
audio_core/cubeb: silent signed/unsigned comparison warning
2019-07-15 07:31:47 +08:00
Pengfei Zhu
4fb80cb079
Merge pull request #4833 from wwylele/network-state
network/room_member: in-header function should be inline
2019-07-15 07:29:49 +08:00
Pengfei Zhu
6b916a22c2
Merge pull request #4831 from wwylele/multiplayer-Wreorder
citra_qt/multiplayer: silent Wreorder warnings
2019-07-15 07:26:04 +08:00
Weiyi Wang
fd3cfd0ae0 ipc_helpers: silent signed comparison warning
index is only used as positive index in arrays. The warning is in DEBUG_ASSERT_MSG(index == TotalSize() ...)
2019-07-14 14:52:17 -04:00
Weiyi Wang
6ee908dc84 kernel: silence -Wreorder 2019-07-14 14:44:17 -04:00
Weiyi Wang
24d2d6aa23 interpreter: silent sign warnings 2019-07-14 14:36:56 -04:00
Weiyi Wang
3dbd1fd4a8 audio_core/cubeb: silent signed/unsigned comparison warning 2019-07-14 14:30:24 -04:00
Weiyi Wang
f7607c820d citra_qt: silent sign comparison warning
🖕Qt
2019-07-14 14:21:02 -04:00
Weiyi Wang
3a567390ee citra_qt/profiler: add parenthesis to silent warning
This is indeed confusing
2019-07-14 14:14:34 -04:00
Weiyi Wang
2bbbfa86d8 network/room_member: in-header function should be inline
Otherwise produces multpile definition in translation units and generates unused warnings
2019-07-14 14:01:13 -04:00
Weiyi Wang
e689847b11 citra_qt/configure_system: fix string comparison (#4830)
country_names has type std::array<char*>. Pointer comparison to test empty string is wrong
2019-07-14 19:26:23 +02:00
Weiyi Wang
1c5a55b3cb citra_qt/camera: silent signed array index warning (#4829) 2019-07-14 19:26:06 +02:00
Weiyi Wang
9c2fe1eae8 citra_qt/multiplayer: silent Wreorder warnings 2019-07-14 11:04:52 -04:00
Weiyi Wang
32f832a81f
Merge pull request #4804 from FearlessTobi/port-2404
Port yuzu-emu/yuzu#2404: "CMakeLists: Ensure we specify Unicode as the codepage on Windows"
2019-07-13 22:28:12 -04:00
Weiyi Wang
4ec2b2d45a
Merge pull request #4820 from bunnei/android-fixes
common: Various fixes and minor improvements.
2019-07-13 22:26:10 -04:00
Weiyi Wang
508fa94e5d
Merge pull request #4799 from bamsbamx/pr-separate-cpu-mem
kernel: handle all page table changes internally when switching processes
2019-07-13 22:25:51 -04:00
Tobias
a546efad31
Port yuzu-emu/yuzu#2529: "yuzu/bootmanager: Minor interface tid… (#4794)
* yuzu/bootmanager: Remove unnecessary pointer casts

We can just invoke these functions by qualifying the object name before
the function.

* yuzu/bootmanager: unsigned -> u32

Same thing (for platforms we support), less reading.

* yuzu/bootmanager: Default EmuThread's destructor in the cpp file

This class contains non-trivial members, so we should default the
destructor's definition within the cpp file.

* yuzu/bootmanager: Treat the resolution factor as a u32

Treating it as a u16 can result in a sign-conversion warning when
performing arithmetic with it, as u16 promotes to an int when aritmetic
is performed on it, not unsigned int.

This also makes the interface more uniform, as the layout interface now
operates on u32 across the board.

* yuzu/bootmanager: Log out screenshot destination path

We can make this message more meaningful by indicating the location the
screenshot has been saved to. We can also log out whenever a screenshot
could not be saved (e.g. due to filesystem permissions or some other
reason).

* Fix compilation
2019-07-11 18:46:44 +02:00
Léo Lam
43d1ee6fb7 ncch_container: Apply IPS patch after allocating .bss
This allows an IPS patch to edit .bss. This is useful for game patches
that need to add code, as putting things in .bss allows adding new code
*without* editing .code and thus without having to relocate everything.
2019-07-10 12:57:30 +02:00
Pengfei Zhu
2f7a10eeaa
Merge pull request #4813 from leoetlino/larger-code
ncch_container: Add support for exheader replacement
2019-07-08 10:56:32 +08:00
bunnei
8eff0696fc
Merge pull request #4823 from FearlessTobi/port-2521
Port yuzu-emu/yuzu#2521: "yuzu/configuration: Make function naming consistent"
2019-07-07 21:45:45 -04:00
bunnei
bf8224213d android: common: file_util: Add user_path, ConfigDir, and CacheDir. 2019-07-07 11:01:13 -04:00
bunnei
1c61f066d1 android: common: logging: Add log output support. 2019-07-07 11:01:13 -04:00
bunnei
4d1de484c6 android: common: Add paths for Android SDCARD_DIR and EMU_DATA_DIR. 2019-07-07 11:01:13 -04:00
bunnei
dd31be16d9 input_common: main: Remove unnecessary HAVE_SDL2 check. 2019-07-07 11:01:00 -04:00
Léo Lam
bc30412484 ncch_container: Add support for exheader replacement
This adds support for custom exheaders, which brings feature parity
with Luma3DS's code patching functionality and allows for injecting
new game code.
2019-07-06 18:01:54 +02:00
Pengfei Zhu
5299678880
Merge pull request #4807 from FearlessTobi/port-2550
Port yuzu-emu/yuzu#2550: "yuzu/CMakeLists: Pass compilation flags that make it more difficult to cause bugs in Qt code"
2019-07-06 23:54:08 +08:00
Lioncash
ba6eb5285d yuzu/configuration: Make function naming consistent 2019-07-06 15:01:41 +02:00
Lioncash
1f2b44d24d CMakeLists: Ensure we specify Unicode as the codepage on Windows
Previously we were building with MBCS, which is pretty undesirable. We
want the application to be Unicode-aware in general.

Currently, we make the command line variant of yuzu use ANSI variants of
the non-standard getopt functions that we link in for Windows, given we
only have an ANSI option-set.

We should really replace getopt with a library that we make all build
types of yuzu link in, but this will have to do for the time being.
2019-07-06 14:04:18 +02:00
Weiyi Wang
99136ec592 gl_rasterizer: correct supress_mipmap_for_cube logic
The previous version would break when the state changes from (cube=true,mipmap=false) -> (cube=true,mipmap=true)
2019-07-06 08:03:01 -04:00
fearlessTobi
b3e819582e Fix compilation problems 2019-07-04 15:47:04 +02:00
Lioncash
e88a9ace8d yuzu/CMakeLists: Disable implicit QString->QUrl conversions
Enforces the use of the proper URL resolution functions. e.g.

url = some_local_path_string;

should actually be:

url = QUrl::fromLocalPath(some_local_path_string);

etc.

This makes it harder to cause bugs when operating with both strings and
URLs at the same time.
2019-07-04 15:39:00 +02:00
Lioncash
3d2e6165d3 yuzu/CMakeLists: Disable unsafe overloads of QProcess' start() function
Other overloads of start() are considerably much safer to use if we ever
need this in the future and need to pass arguments to the program, given
it contains separate parameters for the program path and the arguments
themselves, whereas this unsafe overload contains both as a single
string.

Given the alternatives are much safer, we can disable this.
2019-07-04 15:39:00 +02:00
Lioncash
587b68ed17 yuzu/CMakeLists: Disable implicit type narrowing in connect() calls
Prevents hard-to-diagnose bugs from potentially occurring and requires
any type narrowing to be explicitly performed by our code.
2019-07-04 15:39:00 +02:00
Weiyi Wang
cae913d3d5
Merge pull request #4760 from wwylele/csnd
Foundation for CSND
2019-06-30 23:24:27 -04:00
Léo Lam
70fe0d22de ncch_container: Fix code.bin replacement
Currently, having a replacement code.bin causes Citra to crash as it is
trying to load icon data from code.bin because of a typo. This commit
fixes that typo.
2019-06-30 11:48:28 +02:00
Weiyi Wang
0b4be6e53a
Merge pull request #4803 from FearlessTobi/port-2580
Port yuzu-emu/yuzu#2580: "kernel/vm_manager: Remove redundant Reset call in destructor "
2019-06-29 22:52:36 -04:00
bamsbamx
79b837afa7 kernel: Rename memory page table set function 2019-06-27 16:33:55 +02:00
bamsbamx
ed095f3bff kernel: Nullability check for current_cpu when changing memory page table
This attempts to fix segfault in some tests where page table is set before initializing cpu core (intended behaviour? might be worth a check...)
see: src/tests/core/arm/arm_test_common.cpp
see: src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp
2019-06-26 11:51:42 +02:00
Weiyi Wang
c81a96b0da
Merge pull request #4806 from FearlessTobi/port-2450
Port yuzu-emu/yuzu#2450: "CMakeLists: Explicitly specify -Wall for the non-MSVC case"
2019-06-25 21:25:37 -04:00
bamsbamx
dbfd830695 kernel: Let the kernel handle all page table changes when switching processes
It will both change the page table in memory and notify the CPU about the change by itself. This way there is no need to call memory.SetCurrentPageTable() when kernel.setCurrentProcess() and the management is kept internally in the kernel
2019-06-26 00:39:11 +02:00
Pengfei Zhu
41f1963b9a
Merge pull request #4805 from FearlessTobi/port-2454
Port yuzu-emu/yuzu#2454 and yuzu-emu/yuzu#2460: Add build flags
2019-06-25 22:12:02 +08:00
Lioncash
d4eb63999a CMakeLists: Explicitly specify -Wall for the non-MSVC case
Ensures that -Wall is always active as a compilation flag.
2019-06-24 17:51:15 +02:00
Lioncash
8e79188ca5 CMakeLists: Specify /volatile:iso for MSVC
By default, MSVC doesn't use standards-compliant volatile semantics.
This makes it behave in a standards-compliant manner, making
expectations more uniform across compilers.
2019-06-24 17:48:45 +02:00
Lioncash
e860a0ae59 src/CMakeLists: Add /Zc:externConstexpr to the MSVC build flags
The C++ standard allows constexpr variables declared with the extern
keyword to have external linkage. Previously MSVC wasn't abiding by
this. This just makes the compiler more standards compliant during
builds.

Given we currently don't make use of anything that would break by this,
this is safe to enable.
2019-06-24 17:47:59 +02:00
Lioncash
7f053d0d45 src/CMakeLists: Vertically order compilation flags
Makes it much nicer to visually scan the options. This also starts the
flag descriptions from the same column for the same reason.
2019-06-24 17:46:54 +02:00
Lioncash
1f2e75ecea kernel/vm_manager: Remove redundant Reset call in destructor
This is performing more work than would otherwise be necessary during
VMManager's destruction. All we actually want to occur in this scenario
is for any allocated memory to be freed, which will happen automatically
as the VMManager instance goes out of scope.

Anything else being done is simply unnecessary work.
2019-06-24 17:21:13 +02:00
Weiyi Wang
d483e556e3 gsp: remove unused GetFramebufferInfo 2019-06-23 14:25:28 -04:00
Weiyi Wang
8251de44cf GSP_GPU: move used_thread_ids into the class 2019-06-23 14:22:38 -04:00
bamsbamx
ac9755306c cpu_core: Separate cpu_core and memory
This makes cpu_core and memory being completely independent components inside the system, having a simpler and more understandable initialization process
The thread which casues page table changes in memory will be responsible to notify the cpu_core too
2019-06-22 18:21:50 +02:00
Weiyi Wang
bb776e25a9 pica: move global shader buffer state into Pica::State (#4796) 2019-06-20 00:39:08 +02:00
Tobias
a11bc03d4a
Port yuzu-emu/yuzu#2253: "Migrate off directly modifying CMAKE_* compilation-related flags directly" (#4714)
* CMakeLists: Move compilation flags into the src directory

We generally shouldn't be hijacking CMAKE_CXX_FLAGS, etc as a means to
append flags to the targets, since this adds the compilation flags to
everything, including our externals, which can result in weird issues
and makes the build hierarchy fragile.

Instead, we want to just apply these compilation flags to our targets,
and let those managing external libraries to properly specify their
compilation flags.

This also results in us not getting as many warnings, as we don't raise
the warning level on every external target.

* CMakeLists: Move off of modifying CMAKE_*-related flags

Modifying CMAKE_* related flags directly applies those changes to every
single CMake target. This includes even the targets we have in the
externals directory.

So, if we ever increased our warning levels, or enabled particular ones,
or enabled any other compilation setting, then this would apply to
externals as well, which is often not desirable.

This makes our compilation flag setup less error prone by only applying
our settings to our targets and leaving the externals alone entirely.

This also means we don't end up clobbering any provided flags on the
command line either, allowing users to specifically use the flags they
want.
2019-06-18 12:12:32 +02:00
Pengfei Zhu
73bf92fb3a
Merge pull request #4792 from FearlessTobi/port-2515
Port yuzu-emu/yuzu#2515: "yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect call"
2019-06-10 22:03:32 +08:00
Lioncash
aa1b9a18c6 core/telemetry_session: Remove unnecessary web service nulling out in destructor
This will automatically occur when the backend instance goes out of
scope at the end of the destructor's execution.
2019-06-09 16:47:09 +02:00
Lioncash
0a82b00e35 core/telemetry_session: Remove usages of the global system accessor
Makes the dependency explicit in the TelemetrySession's interface
instead of making it a hidden dependency.

This also revealed a hidden issue with the way the telemetry session was
being initialized. It was attempting to retrieve the app loader and log
out title-specific information. However, this isn't always guaranteed to
be possible.

During the initialization phase, everything is being constructed. It
doesn't mean an actual title has been selected. This is what the Load()
function is for. This potentially results in dead code paths involving
the app loader. Instead, we explicitly add this information when we know
the app loader instance is available.
2019-06-09 16:34:46 +02:00
Lioncash
55ec0f5850 core/telemetry_session: Explicitly delete copy and move constructors
NonCopyable is misleading here. It also makes the class non-moveable as
well, so we can be explicit about this.
2019-06-09 16:26:15 +02:00
Lioncash
1eef771a10 yuzu/configuration/configure_graphics: Eliminate type narrowing in a connect call
A checkbox is able to be tri-state, giving it three possible activity
types, so in the connect call here, it would actually be truncating an
int into a bool.

Instead, we can just listen on the toggled() signal, which passes along
a bool, not an int.
2019-06-09 16:22:43 +02:00
Tobias
318095f9b9
Port yuzu-emu/yuzu#2249: "ipc_helpers: Allow pushing and popping floating-point values" (#4702)
Certain values that are passed through the IPC buffer are actually
floating point values, not solely integral values.
2019-06-09 16:03:22 +02:00
bunnei
56fc61a41f
Merge pull request #4783 from FearlessTobi/port-2517
Port yuzu-emu/yuzu#2517: "configure_hotkeys: Minor cleanup"
2019-06-08 00:12:34 -04:00
bunnei
23770848b4
Merge pull request #4789 from BreadFish64/opt_can_sub_rect
video_core: change "left + width" to "right" in CanSubRect
2019-06-08 00:12:08 -04:00
Tobias
ef73de9386
Port yuzu-emu/yuzu#2511: "common/file_util: Minor cleanup" (#4782)
* common/file_util: Make IOFile's WriteString take a std::string_view

We don't need to force the usage of a std::string here, and can instead
use a std::string_view, which allows writing out other forms of strings
(e.g. C-style strings) without any unnecessary heap allocations.

* common/file_util: Remove unnecessary c_str() calls

The file stream open functions have supported std::string overloads
since C++11, so we don't need to use c_str() here. Same behavior, less
code.

* common/file_util: Make ReadFileToString and WriteStringToFile consistent

Makes the parameter ordering consistent, and also makes the filename
parameter a std::string. A std::string would be constructed anyways with
the previous code, as IOFile's only constructor with a filepath is one
taking a std::string.

We can also make WriteStringToFile's string parameter utilize a
std::string_view for the string, making use of our previous changes to
IOFile.

* common/file_util: Remove duplicated documentation comments

These are already present within the header, so they don't need to be
repeated in the cpp file.

* common/file_util: Make GetCurrentDir() return a std::optional

nullptr was being returned in the error case, which, at a glance may
seem perfectly OK... until you realize that std::string has the
invariant that it may not be constructed from a null pointer. This
means that if this error case was ever hit, then the application would
most likely crash from a thrown exception in std::string's constructor.

Instead, we can change the function to return an optional value,
indicating if a failure occurred.

* common/file_util: Remove unnecessary return at end of void StripTailDirSlashes()

While we're at it, also invert the conditional into a guard clause.
2019-06-08 00:23:57 +02:00
BreadFish64
aaf496dec7 video_core: change "left + width" to "right" in CanSubRect
the constructed rectangle from GetSubRect already has the right info
2019-06-04 17:03:31 -05:00
Lioncash
9fc3e4576b configure_hotkeys: Remove unnecessary Settings::Apply() call
Nothing from the hotkeys dialog relies on this call occurring, and is
already called from the dialog that calls applyConfiguration().
2019-06-01 23:12:59 +02:00
Lioncash
0a65f68b4a configure_hotkeys: Tidy up key sequence conflict error string
Avoids mentioning the user and formalizes the error itself.
2019-06-01 23:12:59 +02:00
Lioncash
640543f8e4 configure_hotkeys: Change critical error dialog into a warning dialog
critical() is intended for critical/fatal errors that threaten the
overall stability of an application. A user entering a conflicting key
sequence is neither of those.
2019-06-01 23:12:59 +02:00
Lioncash
79439fc556 input_common/sdl/sdl_impl: Silence sign conversion warnings
Makes the conversions explicit, as opposed to implicit.
2019-06-01 02:10:46 +02:00
Lioncash
a1b26db389 common/math_util: Provide a template deduction guide for Common::Rectangle
Allows for things such as:

auto rect = Common::Rectangle{0, 0, 0, 0};

as opposed to being required to explicitly write out the underlying
type, such as:

auto rect = Common::Rectangle<int>{0, 0, 0, 0};

The only requirement for the deduction is that all constructor arguments
be the same type.
2019-06-01 02:10:36 +02:00
Lioncash
4b5cbcae21 sequence_dialog: Reorganize the constructor
The previous code was all "smushed" together wasn't really grouped
together that well.

This spaces things out and separates them by relation to one another,
making it easier to visually parse the individual sections of code that
make up the constructor.
2019-05-29 23:49:47 +02:00
Lioncash
ec837cd16c sequence_dialog: Remove unnecessary horizontal specifier
QDialogButtonBoxes are horizontal by default.
2019-05-29 23:49:37 +02:00
Martin Pecánek
186ffc235f Check input profile name for duplicates in New/Rename (#4779)
* Check input profile name for duplicates in New/Rename

* DRY + separation of concerns

* simplify return branching

* make readonly function const
2019-05-24 15:28:59 -06:00
Aner Torre
4b0ce1b770 video_core: Fix fragment_shader compilation failure due to different type variable multiplication 2019-05-19 14:45:41 +02:00
Weiyi Wang
6848592044
Merge pull request #4744 from FearlessTobi/port-2376
Port yuzu-emu/yuzu#2376: "yuzu/configure_hotkey: Minor changes"
2019-05-18 08:33:37 -04:00
Lioncash
563e1622ca configure_dialog: Remove the Whats This? button from the dialog 2019-05-10 20:33:40 +02:00
Lioncash
eeb8dca7b9 yuzu/hotkeys: Remove unnecessary constructor
The behavior of the Hotkey constructor is already accomplished via in-class member
initializers, so the constructor is superfluous here.
2019-05-10 20:30:50 +02:00
Lioncash
95b413a458 yuzu/compatdb: Remove unnecessary qualifiers
Keeps the code consistent in regards to how the buttons are referred to.
2019-05-10 20:30:32 +02:00
Lioncash
c9cc378312 configure_hotkeys: Pass the dialog as a parent to SequenceDialog()
Without passing in a parent, this can result in focus being stolen from
the dialog in certain cases.

Example:

On Windows, if the logging window is left open, the logging Window will
potentially get focus over the hotkey dialog itself, since it brings all
open windows for the application into view. By specifying a parent, we
only bring windows for the parent into view (of which there are none,
aside from the hotkey dialog).
2019-05-07 16:31:43 +02:00
Lioncash
562e0114eb configure_hotkeys: Avoid dialog memory leak within Configure()
Without a parent, this dialog won't have its memory freed when it
happens to get destroyed.
2019-05-07 16:31:43 +02:00
Lioncash
d7d1be509b configure_hotkeys: Mark member variables as const where applicable in Configure() 2019-05-07 16:31:43 +02:00
Lioncash
47176e19be configure_hotkeys: Make comparison check a little more self-documenting
This is checking if an index is valid or not and returning early if it
isn't.
2019-05-07 16:31:43 +02:00
Lioncash
c33c27d646 configure_dialog: Amend constructor initializer list order
Avoids a -Wreorder compiler warning.
2019-05-07 16:31:43 +02:00
Lioncash
21cba77708 configure_hotkey: Remove unnecessary include
Avoids dumping all of the core settings machinery into whatever files
include this header. Nothing inside the header itself actually made use
of anything in settings.h anyways.
2019-05-07 16:30:12 +02:00
Lioncash
35281b4b3b configure_hotkey: Make IsUsedKey() a const member function
This doesn't actually modify instance state of the dialog, so this can
be made const.
2019-05-07 16:30:12 +02:00
Weiyi Wang
46b015befd
Merge pull request #4743 from FearlessTobi/port-2405
Port yuzu-emu/yuzu#2405: "CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target"
2019-05-07 09:35:18 -04:00
Weiyi Wang
803e1fd5a0
Merge pull request #4747 from MerryMage/copyblock
memory: Re-order CopyBlock arguments to match other overload
2019-05-07 09:34:02 -04:00
Weiyi Wang
59879366a6
Merge pull request #4759 from B3n30/load_cia_ticket
FileSys: Load the ticket when the CIAContainer is loaded
2019-05-03 00:44:08 -04:00
liushuyu
8021361bb4
audio_core: dsp_hle: use better f32 to s16...
... conversion by clamping and clipping sample to [-1,1] and use
different masks for negative and positive samples
2019-05-01 15:58:26 -06:00
Tobias
623b0621ab
Port various minor changes from yuzu PRs (#4725)
* common/thread: Remove unused functions

Many of these functions are carried over from Dolphin (where they aren't
used anymore). Given these have no use (and we really shouldn't be
screwing around with OS-specific thread scheduler handling from the
emulator, these can be removed.

The function for setting the thread name is left, however, since it can
have debugging utility usages.

* input_common/sdl: Use a type alias to shorten declaration of GetPollers

Just makes the definitions a little bit more tidy.

* input_common/sdl: Correct return values within implementations of GetPollers()

In both cases, we weren't actually returning anything, which is
undefined behavior.

* yuzu/debugger/graphics_surface: Fill in missing surface format listings

Fills in the missing surface types that were marked as unknown. The
order corresponds with the TextureFormat enum within
video_core/texture.h.

We also don't need to all of these strings as translatable (only the
first string, as it's an English word).

* yuzu/debugger/graphics_surface: Clean up connection overload deduction

We can utilize qOverload with the signal connections to make the
function deducing a little less ugly.

* yuzu/debugger/graphics_surface: Tidy up SaveSurface

- Use QStringLiteral where applicable.

- Use const where applicable

- Remove unnecessary precondition check (we already assert the pixbuf
  being non null)

* yuzu/debugger/graphics_surface: Display error messages for file I/O errors

* core: Add missing override specifiers where applicable

Applies the override specifier where applicable. In the case of
destructors that are  defaulted in their definition, they can
simply be removed.

This also removes the unnecessary inclusions being done in audin_u and
audrec_u, given their close proximity.

* kernel/thread: Make parameter of GetWaitObjectIndex() const qualified

The pointed to member is never actually modified, so it can be made
const.

* kernel/thread: Avoid sign conversion within GetCommandBufferAddress()

Previously this was performing a u64 + int sign conversion. When dealing
with addresses, we should generally be keeping the arithmetic in the
same signedness type.

This also gets rid of the static lifetime of the constant, as there's no
need to make a trivial type like this potentially live for the entire
duration of the program.

* kernel/codeset: Make CodeSet's memory data member a regular std::vector

The use of a shared_ptr is an implementation detail of the VMManager
itself when mapping memory. Because of that, we shouldn't require all
users of the CodeSet to have to allocate the shared_ptr ahead of time.
It's intended that CodeSet simply pass in the required direct data, and
that the memory manager takes care of it from that point on.

This means we just do the shared pointer allocation in a single place,
when loading modules, as opposed to in each loader.

* kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const

Given this is intended as a querying function, it doesn't make sense to
allow the implementer to modify the state of the given thread.
2019-05-01 14:28:49 +02:00
Lioncash
564032307d CMakeLists: Define QT_USE_QSTRINGBUILDER for the Qt target
This is a compile definition introduced in Qt 4.8 for reducing the total
potential number of strings created when performing string
concatenation. This allows for less memory churn.

This can be read about here:
https://blog.qt.io/blog/2011/06/13/string-concatenation-with-qstringbuilder/

For a change that isn't source-compatible, we only had one occurrence
that actually need to have its type clarified, which is pretty good, as
far as transitioning goes.
2019-05-01 14:26:13 +02:00
Pengfei Zhu
e0a0bca13a
Merge pull request #4749 from zhaowenlan1779/webfix
web_service: Misc fixes
2019-05-01 17:00:17 +08:00
Pengfei Zhu
37861526ff
Merge pull request #4733 from zhaowenlan1779/ps
service/ps: Implement PS:EncryptDecryptAes
2019-04-29 21:39:53 +08:00
Weiyi Wang
64641cf958 CSND: handle command processing 2019-04-28 15:25:46 -04:00
B3n30
14ed702971 FileSys: Load the ticket when the CIAContainer is loaded 2019-04-28 21:21:28 +02:00
Tobias
7ea82e7941
Merge pull request #4736 from FearlessTobi/port-2356
Port yuzu-emu/yuzu#2356: "kernel/{server_port, server_session}: Return pairs instead of tuples from pair creation functions"
2019-04-27 00:07:13 +02:00
James Rowe
3f2c7eb471
Merge pull request #4738 from FearlessTobi/port-1020-new
Port yuzu-emu/yuzu#1020: "core: Namespace EmuWindow"
2019-04-26 08:58:09 -06:00
Ben
f4da2de99a
Set accepted EULA version to max value (#4728)
* Set accepted EULA version to max value

CFG: write the max value of 0x7F7F to the default cfg savegame and
auto update on init

CECD: Actually read the EULA version from CFG
2019-04-23 23:18:27 +02:00
Ben
624271696e
HTTP_C: Implement SetClientCertContext, GetSSLError, BeginRequest, BeginRequestAsync (#4753)
* HTTP_C: Implement SetClientCertContext and GetSSLError; Stubbed BeginRequest and BeginRequestAsync

* HTTP_C: Move logs to beginning of function calls
2019-04-23 18:35:28 +02:00
Lioncash
6e22891761 core: Namespace EmuWindow
Gets the class out of the global namespace.
2019-04-21 14:16:16 +02:00
Lioncash
882f647760 kernel/wait_object: Make GetHighestPriorityReadyThread() a const member function
This doesn't actually modify internal state of a wait object, so it can
be const qualified.
2019-04-20 20:38:38 +02:00
Pengfei Zhu
536e4de499
Merge pull request #4700 from zhaowenlan1779/swkbd-2
applets/swkbd: Add callback support
2019-04-20 22:18:15 +08:00
zhupengfei
40ad54c5c7
citra_qt: Update the multiplayer dialogs when game list is repopulated
The multiplayer state object and dialogs hold a (modified) game list model, but it isn't updated when the actual game list changes. This updates the multiplayer dialogs with the new game list when it got repopulated.
2019-04-20 12:50:26 +08:00
zhupengfei
4a9ea65e49
core, citra_qt: Allow credentials update in multiplayer announce session
Allows updating the credentials of the announce session, thus allowing credentials changes to be reflected before citra restart. To avoid race conditions and web errors (you can only update the room that you created, i.e. changing credentials halfway will make it break), now you can only use the Citra Web Services settings when not hosting a public room.
2019-04-20 12:50:24 +08:00
zhupengfei
d6b168d7ed
citra_qt/multiplayer: Disallow hosting rooms when preferred game is not selected
which can happen if the game list is empty, and would result in a 400 being returned from the server as the preferred_game field is empty.
2019-04-20 12:50:20 +08:00
zhupengfei
36051204cc core, web_service: Check for error when registering rooms
The `Register()` function can now handle error results and the error will be passed immediately to the Qt frontend, instead of being ignored silently and failing later with a "Room is not registered".
2019-04-20 12:50:14 +08:00
zhupengfei
81988d96fe
core/telemetry_session: Only create the backend when we really need it
The backend is not used until we decide to submit the testcase/telemetry, and creating it early prevents users from updating the credentials properly while the games are running.
2019-04-20 12:49:14 +08:00
MerryMage
065d3ce063 memory: Reorder parameters of CopyBlock to a more sensible order
* Also implement CopyBlock variants in terms of each other
2019-04-19 19:46:09 +01:00
Weiyi Wang
0ec45f694c
Merge pull request #3910 from wwylele/mipmap
gl_rasterizer: implement mipmap by forwarding PICA mipmap configuration
2019-04-17 14:10:42 -04:00
zhupengfei
0f65dac964
service/ps: Address review 2019-04-16 22:17:07 +08:00
Weiyi Wang
5f5e991884
Merge pull request #4734 from FearlessTobi/port-2391
Port yuzu-emu/yuzu#2391 and yuzu-emu/yuzu#2392: Changes to common
2019-04-16 09:48:52 -04:00
Lioncash
42535468c3 kernel/server_session: Return a std::pair from CreateSessionPair()
Keeps the return type consistent with the function name. While we're at
it, we can also reduce the amount of boilerplate involved with handling
these by using structured bindings.
2019-04-15 21:46:57 +02:00
Lioncash
1afc2c72d6 kernel/server_port: Return a std::pair from CreatePortPair()
Returns the same type that the function name describes.
2019-04-15 18:42:17 +02:00
Lioncash
c4c644b285 kernel: Make handle type declarations constexpr
Some objects declare their handle type as const, while others declare it
as constexpr. This makes the const ones constexpr for consistency, and
prevent unexpected compilation errors if these happen to be attempted to be
used within a constexpr context.
2019-04-15 18:10:11 +02:00
Lioncash
b8d43d4dfb common/swap: Improve codegen of the default swap fallbacks
Uses arithmetic that can be identified more trivially by compilers for
optimizations. e.g. Rather than shifting the halves of the value and
then swapping and combining them, we can swap them in place.

e.g. for the original swap32 code on x86-64, clang 8.0 would generate:

    mov     ecx, edi
    rol     cx, 8
    shl     ecx, 16
    shr     edi, 16
    rol     di, 8
    movzx   eax, di
    or      eax, ecx
    ret

while GCC 8.3 would generate the ideal:

    mov     eax, edi
    bswap   eax
    ret

now both generate the same optimal output.

MSVC used to generate the following with the old code:

    mov     eax, ecx
    rol     cx, 8
    shr     eax, 16
    rol     ax, 8
    movzx   ecx, cx
    movzx   eax, ax
    shl     ecx, 16
    or      eax, ecx
    ret     0

Now MSVC also generates a similar, but equally optimal result as clang/GCC:

    bswap   ecx
    mov     eax, ecx
    ret     0

====

In the swap64 case, for the original code, clang 8.0 would generate:

    mov     eax, edi
    bswap   eax
    shl     rax, 32
    shr     rdi, 32
    bswap   edi
    or      rax, rdi
    ret

(almost there, but still missing the mark)

while, again, GCC 8.3 would generate the more ideal:

    mov     rax, rdi
    bswap   rax
    ret

now clang also generates the optimal sequence for this fallback as well.

This is a case where MSVC unfortunately falls short, despite the new
code, this one still generates a doozy of an output.

    mov     r8, rcx
    mov     r9, rcx
    mov     rax, 71776119061217280
    mov     rdx, r8
    and     r9, rax
    and     edx, 65280
    mov     rax, rcx
    shr     rax, 16
    or      r9, rax
    mov     rax, rcx
    shr     r9, 16
    mov     rcx, 280375465082880
    and     rax, rcx
    mov     rcx, 1095216660480
    or      r9, rax
    mov     rax, r8
    and     rax, rcx
    shr     r9, 16
    or      r9, rax
    mov     rcx, r8
    mov     rax, r8
    shr     r9, 8
    shl     rax, 16
    and     ecx, 16711680
    or      rdx, rax
    mov     eax, -16777216
    and     rax, r8
    shl     rdx, 16
    or      rdx, rcx
    shl     rdx, 16
    or      rax, rdx
    shl     rax, 8
    or      rax, r9
    ret     0

which is pretty unfortunate.
2019-04-15 17:56:16 +02:00
Lioncash
686d067271 common/swap: Mark byte swapping free functions with [[nodiscard]] and noexcept
Allows the compiler to inform when the result of a swap function is
being ignored (which is 100% a bug in all usage scenarios). We also mark
them noexcept to allow other functions using them to be able to be
marked as noexcept and play nicely with things that potentially inspect
"nothrowability".
2019-04-15 17:56:09 +02:00
Lioncash
5664613640 common/swap: Simplify swap function ifdefs
Including every OS' own built-in byte swapping functions is kind of
undesirable, since it adds yet another build path to ensure compilation
succeeds on.

Given we only support clang, GCC, and MSVC for the time being, we can
utilize their built-in functions directly instead of going through the
OS's API functions.

This shrinks the overall code down to just

if (msvc)
  use msvc's functions
else if (clang or gcc)
  use clang/gcc's builtins
else
  use the slow path
2019-04-15 17:56:01 +02:00