Skip to content

Commit 643d110

Browse files
committed
Add SDL camera handler
1 parent ea6bb77 commit 643d110

18 files changed

Lines changed: 1192 additions & 5 deletions

rpcs3/Emu/Cell/Modules/cellGem.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,15 @@ void gem_config_data::operator()()
15011501
vc = vc_attribute;
15021502
}
15031503

1504-
if (g_cfg.io.camera != camera_handler::qt)
1504+
switch (g_cfg.io.camera)
15051505
{
1506+
#ifdef HAVE_SDL3
1507+
case camera_handler::sdl:
1508+
#endif
1509+
case camera_handler::qt:
1510+
break;
1511+
case camera_handler::fake:
1512+
case camera_handler::null:
15061513
video_conversion_in_progress = false;
15071514
done();
15081515
continue;

rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu_settings.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,17 @@ namespace rsx
8080
add_checkbox(&g_cfg.io.keep_pads_connected, localized_string_id::HOME_MENU_SETTINGS_INPUT_KEEP_PADS_CONNECTED);
8181
add_checkbox(&g_cfg.io.show_move_cursor, localized_string_id::HOME_MENU_SETTINGS_INPUT_SHOW_PS_MOVE_CURSOR);
8282

83-
if (g_cfg.io.camera == camera_handler::qt)
83+
switch (g_cfg.io.camera)
8484
{
85+
#ifdef HAVE_SDL3
86+
case camera_handler::sdl:
87+
#endif
88+
case camera_handler::qt:
8589
add_dropdown(&g_cfg.io.camera_flip_option, localized_string_id::HOME_MENU_SETTINGS_INPUT_CAMERA_FLIP);
90+
break;
91+
case camera_handler::fake:
92+
case camera_handler::null:
93+
break;
8694
}
8795

8896
add_dropdown(&g_cfg.io.pad_mode, localized_string_id::HOME_MENU_SETTINGS_INPUT_PAD_MODE);

rpcs3/Emu/system_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ struct cfg_root : cfg::node
267267
cfg::_enum<fake_camera_type> camera_type{ this, "Camera type", fake_camera_type::unknown };
268268
cfg::_enum<camera_flip> camera_flip_option{ this, "Camera flip", camera_flip::none, true };
269269
cfg::string camera_id{ this, "Camera ID", "Default", true };
270+
cfg::string sdl_camera_id{ this, "SDL Camera ID", "Default", true };
270271
cfg::_enum<move_handler> move{ this, "Move", move_handler::null, true };
271272
cfg::_enum<buzz_handler> buzz{ this, "Buzz emulated controller", buzz_handler::null };
272273
cfg::_enum<turntable_handler> turntable{this, "Turntable emulated controller", turntable_handler::null};

rpcs3/Emu/system_config_types.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ void fmt_class_string<camera_handler>::format(std::string& out, u64 arg)
358358
case camera_handler::null: return "Null";
359359
case camera_handler::fake: return "Fake";
360360
case camera_handler::qt: return "Qt";
361+
#ifdef HAVE_SDL3
362+
case camera_handler::sdl: return "SDL";
363+
#endif
361364
}
362365

363366
return unknown;

rpcs3/Emu/system_config_types.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,10 @@ enum class camera_handler
116116
{
117117
null,
118118
fake,
119-
qt
119+
qt,
120+
#ifdef HAVE_SDL3
121+
sdl,
122+
#endif
120123
};
121124

122125
enum class camera_flip

0 commit comments

Comments
 (0)