Commit graph

8580 commits

Author SHA1 Message Date
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
Vitor Kiguchi aa43399011 Bump bundled sdl2 and appveyor to sdl2.0.10 2020-03-05 15:25:02 -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
The Citra Community 1223dde349 second translation update 2020-03-03 07:08:42 +00: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
The Citra Community 4aeb0c32b9 Update translations (2020-03-01) 2020-03-01 01:31:23 +00: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
Weiyi Wang 2c0bd0f2a1
travis/transifex: use HEREDOC for initializing config (#5109)
It seems that in recent bash update in CI doesn't correctly interpret the quote string any more.
2020-02-29 19:52:34 +01: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
Marshall Mohror 9dfb83f1e1
Update README.md (#5097)
* Update README.md

* fix travis link
2020-02-29 11:13:28 -06:00
Pengfei Zhu cd46e62ad4
Merge pull request #5110 from zhaowenlan1779/game-modding-2
core/file_sys: Add alternative override pathes for ExeFS files
2020-02-29 11:16:42 +08: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
BreadFish64 670119ef86 android: use cmake 3.10
bitrise still doesn't have 3.10 despite it being part of the NDK now
2020-02-21 16:47:04 -06:00