Commit graph

189 commits

Author SHA1 Message Date
ReinUsesLisp
4b80dd23a4 yuzu_cmd: Split emu_window OpenGL implementation into its own file 2019-05-25 17:47:13 -03:00
Zach Hilman
658d2ee97d settings: Add 'Reporting Services' config option
Full enable/disable for all reports.
2019-05-25 16:09:20 -04:00
Lioncash
2b1fcc8a14 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.
2019-05-23 13:52:43 -04:00
bunnei
6f1720a5b7
Merge pull request #2477 from ReinUsesLisp/fix-sdl2
yuzu_cmd: Make OpenGL's context current
2019-05-17 13:04:33 -04:00
ReinUsesLisp
69265e4504 yuzu_cmd: Use OpenGL compat when asked in the settings 2019-05-17 04:25:26 -03:00
ReinUsesLisp
5f877d9458 yuzu_cmd: Make OpenGL's context current
The SDL2 frontend never bound the OpenGL context, resulting on a white
screen and no-ops all over the backend.
2019-05-17 04:13:20 -03:00
bunnei
94db649205
Merge pull request #2424 from FernandoS27/compat
Allow picking a Compatibility Profile for OpenGL.
2019-04-24 22:54:27 -04:00
Fernando Sahmkow
788497fd9d Allow picking a Compatibility Profile for OpenGL.
This option allows picking the compatibility profile since a lot of bugs
are fixed in it. We devs will use this option to easierly debug current
problems in our Core implementation.:wq
2019-04-20 00:05:24 -04:00
Lioncash
819c21d99e 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-04-16 21:23:34 -04:00
bunnei
065f83c6c3
Merge pull request #2017 from jroweboy/glwidget
Frontend: Migrate to QOpenGLWindow and support shared contexts
2019-04-13 22:08:40 -04:00
bunnei
61f63bb994
Merge pull request #1957 from DarkLordZach/title-provider
file_sys: Provide generic interface for accessing game data
2019-04-09 19:16:37 -04:00
fearlessTobi
ff7e6a42c1 core/yuzu: Remove enable_nfc setting
This was initially added to prevent problems from stubbed/not implemented NFC services, but as we never encountered such and as it's only used in a deprecated function anyway, I guess we can just remove it to prevent more clutter of the settings.
2019-03-29 15:02:28 +01:00
Zach Hilman
41d2565f29 game_list: Register content with ContentProvider 2019-03-26 22:05:37 -04:00
xperia64
ec74a4fd4a Fix getopt on systems where char is unsigned by default 2019-03-19 23:53:40 +01:00
bunnei
0a923b4ab3
Merge pull request #2187 from FearlessTobi/port-sdl-things
Port various Citra changes to input_common, including deadzone support
2019-03-13 11:46:57 -04:00
ReinUsesLisp
45ef421b6b yuzu_cmd/config: Replace C casts with static_cast 2019-03-09 03:59:23 -03:00
ReinUsesLisp
fedef7bda3 yuzu_cmd/config: Silent implicit cast warning 2019-03-09 03:58:20 -03:00
bunnei
4f352833a5
Merge pull request #2055 from bunnei/gpu-thread
Asynchronous GPU command processing
2019-03-07 10:41:53 -05:00
bunnei
d6015ee211 settings: Add new graphics setting for use_asynchronous_gpu_emulation. 2019-03-06 21:09:09 -05:00
Lioncash
697a4669e1 yuzu-cmd/yuzu: Replace direct usage of the global system telemetry accessor in main()
We already have the system instance around, so we can use that instead
of the accessor.
2019-03-04 10:24:13 -05:00
James Rowe
09ac66388c Input: Remove global variables from SDL Input
Changes the interface as well to remove any unique methods that
frontends needed to call such as StartJoystickEventHandler by
conditionally starting the polling thread only if the frontend hasn't
started it already. Additionally, moves all global state into a single
SDLState class in order to guarantee that the destructors are called in
the proper order
2019-03-02 19:09:34 +01:00
ReinUsesLisp
eb73247433 gl_shader_cache: Link loading screen with disk shader cache load 2019-02-06 22:23:40 -03:00
ReinUsesLisp
e78da8dc1f settings: Hide shader cache behind a setting 2019-02-06 22:20:57 -03:00
zhupengfei
a94a828b6c citra_qt: Log settings on launch 2019-01-22 23:35:38 +01:00
James Rowe
f2a2f818b6 SDL Frontend: Add shared context support 2019-01-21 16:00:01 -07:00
Zach Hilman
05dbb47af5 settings: Use std::chrono::seconds instead of s64 for RTC 2019-01-07 19:19:40 -05:00
Zach Hilman
dbb1eb9c29 time: Use custom RTC settings if applicable for game 2019-01-07 19:19:40 -05:00
Zach Hilman
c6016856d8 settings: Add custom RTC settings
Stored as signed seconds since epoch.
2019-01-07 19:18:45 -05:00
Zach Hilman
f6f6503578 qt: Add Properties menu to game list right-click 2018-12-04 13:34:50 -05:00
Zach Hilman
c381f46428 config: Store and load disabled add-ons list 2018-12-03 17:20:34 -05:00
ReinUsesLisp
22c7c710b4 gl_rasterizer: Remove extension booleans 2018-11-28 21:18:13 -03:00
bunnei
d01bf170c4
Merge pull request #1725 from FernandoS27/gl43
Update OpenGL's backend version from 3.3 to 4.3
2018-11-23 23:56:57 -05:00
bunnei
67ff974387
Merge pull request #1747 from DarkLordZach/exefs-lfs
patch_manager: Add support for applying LayeredFS patches to ExeFS
2018-11-23 23:31:48 -05:00
FernandoS27
0368260c99 Removed pre 4.3 ARB extensions 2018-11-21 11:43:17 -04:00
FernandoS27
377c60645c Update OpenGL's backend version from 3.3 to 4.3 2018-11-21 11:43:17 -04:00
Zach Hilman
17d8e25cbf settings: Add option to dump ExeFS of games upon launch
When enabled, all exefs(es) will be copied to yuzu/dump/<title_id>/exefs.
2018-11-20 17:49:09 -05:00
Zach Hilman
312ef596a5 configure_input_player: Set minimum width on controls 2018-11-18 23:22:36 -05:00
Zach Hilman
b8f7f9651e yuzu_cmd/config: Add config deserialization for multiplayer 2018-11-18 23:22:36 -05:00
Schplee
9a47e40dd6 Correctly sets default system language for yuzu-CLI (#1727)
* Correctly sets default system language for yuzu-CLI

A user reported that yuzu_cmd runs games in Japanese rather than the correct default of English (like yuzu-qt does correctly), this change fixes that.

* fix clang issue

deleted whitespace
2018-11-18 19:21:17 -08:00
bunnei
97605e36f7
Merge pull request #1618 from DarkLordZach/dump-nso
patch_manager: Add support for dumping uncompressed NSOs
2018-11-15 14:46:10 -08:00
Zach Hilman
2a16fd7ffc settings: Add config option to set RNG seed 2018-11-11 23:09:46 -05:00
bunnei
e10483a878
Merge pull request #1441 from CarlKenner/DebuggerLog
logging: Add DebuggerBackend for logging to Visual Studio
2018-11-05 00:19:59 -05:00
Zach Hilman
48eb3742b9 settings: Add setting to control NSO dumping
Also adds UI option in Debug > Dump section, with the idea later things to be dumped (i.e. other game data or textures, etc) will use the same group box.
2018-10-29 16:09:08 -04:00
Zach Hilman
45f2a2fe29 acc: Fix account UUID duplication error 2018-10-23 19:31:28 -04:00
Zach Hilman
702622b8f1 profile_manager: Load user icons, names, and UUIDs from system save 2018-10-23 19:31:28 -04:00
Zach Hilman
e7e3d5898e settings: Add users and current_user settings and remove username 2018-10-23 19:31:28 -04:00
David
50e4e81fd3 Added Amiibo support (#1390)
* Fixed conflict with nfp

* Few fixups for nfc

* Conflict 2

* Fixed AttachAvailabilityChangeEvent

* Conflict 3

* Fixed byte padding

* Refactored amiibo to not reside in "System"

* Removed remaining references of nfc from system

* used enum for Nfc GetStateOld

* Added missing newline

* Moved file operations to front end

* Conflict 4

* Amiibos now use structs and added mutexes

* Removed amiibo_path
2018-10-23 19:28:17 -04:00
bunnei
ee7c2dbf5a config: Rename use_accurate_framebuffers -> use_accurate_gpu_emulation.
- This will be used as a catch-all for slow-but-accurate GPU emulation paths.
2018-10-16 17:02:29 -04:00
Lioncash
0149162dba filesystem: Make CreateFactories() and InstallInterface() take a VfsFilesystem instance by reference
Neither of these functions alter the ownership of the provided pointer,
so we can simply make the parameters a reference rather than a direct
shared pointer alias. This way we also disallow passing incorrect memory values like
nullptr.
2018-10-13 11:36:35 -04:00
NeatNit
4f24343f32 implemented touch in Qt and SDL
change TouchToPixelPos to return std::pair<int, int>

static_cast (SDL)

various minor style and code improvements

style - PascalCase for function names

made touch events private

const pointer arg in touch events

make TouchToPixelPos a const member function

did I do this right?

braces on barely-multiline if

remove question comment (confirmed in Discord)

fixed consts

remove unused parameter from TouchEndEvent

DRY - High-DPI scaled touch put in separate function

also fixes a bug where if you start touching (with either mouse or touchscreen) and drag the mouse to the LEFT of the emulator window, the touch point jumps to the RIGHT side of the touchscreen; draggin to above the window would make it jump to the bottom.

implicit conversion from QPoint to QPointF, apparently

I have no idea what const even means but I'll put it here anyway

remove unused or used-once variables

make touch scaling functions const, and put their implementations together

removed unused FingerID parameters

QTouchEvent forward declaration; add comment to TouchBegin that was lost in an edit

better DRY in SDL

To do -> TODO(NeatNit)

remove unused include
2018-10-09 20:26:57 +02:00
Zach Hilman
081f5c1dbf cmd: Support passing game arguments from command line
Uses -p (--program) and following string as args.
2018-10-07 14:32:32 -04:00
Carl Kenner
f5f6292810 logging: Add DebuggerBackend for logging to Visual Studio 2018-10-07 13:24:04 +10:30
bunnei
2fbb20b2b5 yuzu/yuzu_cmd: Add checks for required extension ARB_copy_image. 2018-10-06 12:06:40 -04:00
fearlessTobi
aa48468862 Review comments - part 3 2018-10-02 15:30:48 +02:00
fearlessTobi
4d139943f2 Port web_service from Citra 2018-10-02 15:30:48 +02:00
Valentin Vanelslande
19d9b0778a
Update config.cpp 2018-09-21 16:16:51 -05:00
bunnei
000da01c1d
Merge pull request #1337 from DarkLordZach/create-fs-cmd
yuzu-cmd: Add filesystem service initializer call
2018-09-20 23:36:11 -04:00
Zach Hilman
9bba103791 yuzu-cmd: Add call to CreateFactories
Ensures all relevant filesystem objects are initialized and eliminates a crash related to the RegisteredCache.
2018-09-19 09:09:11 -04:00
Philippe Babin
9155c8daeb Invalid default value of username in yuzu_cmd (#1334)
* Fix bug where default username value for yuzu_cmd create an userprofile with uninitialize data as username

* Fix format

* Apply code review changes

* Remove nullptr check
2018-09-18 19:58:28 -04:00
ReinUsesLisp
a42376dfad Use ARB_multi_bind for uniform buffers (#1287)
* gl_rasterizer: use ARB_multi_bind for uniform buffers

* address feedback
2018-09-12 20:27:43 -04:00
bunnei
926dd41587
Merge pull request #1163 from FearlessTobi/add-audio-stretching
audio_core: Add audio stretching support
2018-09-12 18:23:54 -04:00
Markus Wick
3e973bc4c6 gl_rasterizer: Use ARB_texture_storage.
It allows us to use texture views and it reduces the overhead within the GPU driver.

But it disallows us to reallocate the texture, but we don't do so anyways.

In the end, it is the new way to allocate textures, so there is no need to use the old way.
2018-09-11 22:18:46 +02:00
Tobias
804115b2a4 Port #4141 from citra: Joystick hotplug support (#1275)
* Joystick hotplug support (#4141)

* use SDL_PollEvent instead of SDL_JoystickUpdate

Register hot plugged controller by GUID if they were configured in a previous session

* Move SDL_PollEvent into its own thread

* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call

* Fix that joystick_list gets cleared after SDL_Quit

* Add VirtualJoystick for InputDevices thats never nullptr

* fixup! Add VirtualJoystick for InputDevices thats never nullptr

* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr

* Remove SDL_GameController, make SDL_Joystick* unique_ptr

* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr

* Adressed feedback; fixed handling of same guid reconnects

* fixup! Adressed feedback; fixed handling of same guid reconnects

* merge the two joystick_lists into one

* make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! fixup! make SDLJoystick a member of VirtualJoystick

* SDLJoystick: Addressed review comments

* Address one missed review comment
2018-09-10 21:29:59 -04:00
bunnei
f9e468d891
Merge pull request #1258 from tgsm/fix-sdl-logging
yuzu-cmd: fix SDL logging
2018-09-09 22:34:23 -04:00
fearlessTobi
a6efff8b02 Add audio stretching support 2018-09-08 18:26:23 +01:00
bunnei
8b08cb925b gl_rasterizer: Use baseInstance instead of moving the buffer points.
This hopefully helps our cache not to redundant upload the vertex buffer.

# Conflicts:
#	src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08 04:05:56 -04:00
tgsm
975226e7ff yuzu-cmd: fix SDL logging 2018-09-08 03:12:47 -04:00
CaptV0rt3x
9382414b20 For SDL Frontend 2018-09-07 11:57:05 +05:30
fearlessTobi
742f895f8b frontend: Set swap interval to 0 2018-09-06 18:57:51 +02:00
bunnei
ed37b68fb5
Merge pull request #1223 from DarkLordZach/custom-nand-sd-dirs
file_sys: Allow for custom NAND/SD directories
2018-09-04 11:54:22 -04:00
Zach Hilman
b2268f1f8d settings: Save and load NAND/SD dirs from config 2018-09-03 19:23:33 -04:00
Lioncash
a405373144 vfs_real: Forward declare IOFile
Eliminates the need to rebuild some source files if the file_util header
ever changes. This also uncovered some indirect inclusions, which have
also been fixed.
2018-09-02 12:38:14 -04:00
Lioncash
4a587b81b2 core/core: Replace includes with forward declarations where applicable
The follow-up to e2457418da, which
replaces most of the includes in the core header with forward declarations.

This makes it so that if any of the headers the core header was
previously including change, then no one will need to rebuild the bulk
of the core, due to core.h being quite a prevalent inclusion.

This should make turnaround for changes much faster for developers.
2018-08-31 16:30:14 -04:00
fearlessTobi
ba8ff096fd Port #3353 from Citra 2018-08-21 01:14:06 +02:00
David Marcec
706fc5d2d6 Added check to see if ARB_texture_mirror_clamp_to_edge is supported 2018-08-19 12:00:33 +10:00
Lioncash
87d8a9c986 loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an
overload of operator<<.

While we're at it, perform proper bounds checking. If something exceeds
the array, it should be a hard fail, because it's, without a doubt, a
programmer error in this case.
2018-08-15 05:52:37 -04:00
Lioncash
0a93b45b6a core: Namespace EmuWindow
Gets the class out of the global namespace.
2018-08-11 20:20:21 -04:00
Zach Hilman
ec3bef7b4c loader: Add more descriptive errors
Full list of new errors and descriptions in core/loader/loader.h
2018-08-09 21:06:59 -04:00
Zach Hilman
4b471f0554 core: Port core to VfsFilesystem for file access 2018-08-08 21:18:45 -04:00
bunnei
c0af42d6eb
Merge pull request #912 from lioncash/global-var
video_core: Eliminate the g_renderer global variable
2018-08-05 16:37:39 -04:00
bunnei
2b06301dbf
Merge pull request #849 from DarkLordZach/xci
XCI and Encrypted NCA Support
2018-08-04 14:33:11 -04:00
Lioncash
6030c5ce41 video_core: Eliminate the g_renderer global variable
We move the initialization of the renderer to the core class, while
keeping the creation of it and any other specifics in video_core. This
way we can ensure that the renderer is initialized and doesn't give
unfettered access to the renderer. This also makes dependencies on types
more explicit.

For example, the GPU class doesn't need to depend on the
existence of a renderer, it only needs to care about whether or not it
has a rasterizer, but since it was accessing the global variable, it was
also making the renderer a part of its dependency chain. By adjusting
the interface, we can get rid of this dependency.
2018-08-04 02:36:57 -04:00
David
c1d54f4aea Added ability to change username & language code in the settings ui. Added IProfile::Get and SET::GetLanguageCode for libnx tests (#851) 2018-08-03 11:02:55 -04:00
Lioncash
0f2ac928f2 video_core: Make global EmuWindow instance part of the base renderer class
Makes the global a member of the RendererBase class. We also change this
to be a reference. Passing any form of null pointer to these functions
is incorrect entirely, especially given the code itself assumes that the
pointer would always be in a valid state.

This also makes it easier to follow the lifecycle of instances being
used, as we explicitly interact the renderer with the rasterizer, rather
than it just operating on a global pointer.
2018-08-01 21:40:30 -04:00
Zach Hilman
0497bb5528 Fix merge conflicts with opus and update docs 2018-08-01 00:16:54 -04:00
Zach Hilman
187d8e215f Use more descriptive error codes and messages 2018-08-01 00:16:54 -04:00
Zach Hilman
239a3113e4 Make XCI comply to review and style guidelines 2018-08-01 00:16:54 -04:00
Zach Hilman
df5b75694f Remove files that are not used 2018-08-01 00:16:54 -04:00
bunnei
ca84b530a3 audio_core: Add configuration settings. 2018-07-31 22:38:42 -04:00
bunnei
ec2b7cdb1d
Merge pull request #836 from FearlessTobi/port-3594
Port #3665 from Citra: "frontend: Log Citra version"
2018-07-26 12:04:30 -07:00
fearlessTobi
6f05a57712 Port #3665 from Citra 2018-07-26 15:51:14 +02:00
fearlessTobi
7a2acc86e6 Port #3641 from Citra 2018-07-26 15:35:10 +02:00
Subv
ba2fb83d60 Frontend: Check for more required OpenGL extensions during startup. 2018-07-22 12:05:38 -05:00
Lioncash
d66b43dadf file_util: Use an enum class for GetUserPath()
Instead of using an unsigned int as a parameter and expecting a user to
always pass in the correct values, we can just convert the enum into an
enum class and use that type as the parameter type instead, which makes
the interface more type safe.

We also get rid of the bookkeeping "NUM_" element in the enum by just
using an unordered map. This function is generally low-frequency in
terms of calls (and I'd hope so, considering otherwise would mean we're
slamming the disk with IO all the time) so I'd consider this acceptable
in this case.
2018-07-21 16:21:19 -04:00
bunnei
03c2d049d4 settings: Turn docked mode off by default. 2018-07-17 22:52:25 -04:00
bunnei
05cb10530f OpenGL: Use MakeCurrent/DoneCurrent for multithreaded rendering. 2018-07-14 02:50:35 -04:00
Tobias
316b933a31 Port #3335 and #3373 from Citra: "Small SDL fixes" and "Print the actual error preventing SDL from working" (#637)
* Port #3335 and #3373 from Citra

* Fixup: Use the new logging placeholders
2018-07-12 09:26:27 -07:00
James Rowe
020d005d8c yuzu-cmd Apply the filter string from settings 2018-07-12 01:09:03 -06:00
fearlessTobi
c9aadff9a9 Remove some references to Citra 2018-07-06 15:47:06 +02:00
bunnei
76b475faf7 Fix build and address review feedback 2018-07-02 21:45:48 -04:00