mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[XAM] Added config option to enable stereoscopic mode in titles
This commit is contained in:
parent
e9b2464254
commit
a871079ee0
|
|
@ -11,17 +11,37 @@
|
||||||
#include "xenia/kernel/xam/xam_private.h"
|
#include "xenia/kernel/xam/xam_private.h"
|
||||||
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
#include "xenia/kernel/xboxkrnl/xboxkrnl_video.h"
|
||||||
|
|
||||||
|
DEFINE_bool(enable_3d_mode, false,
|
||||||
|
"Enables usage of stereoscopic mode in titles.", "Video");
|
||||||
|
|
||||||
namespace xe {
|
namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
namespace xam {
|
namespace xam {
|
||||||
|
|
||||||
|
enum X_VIDEO_CAPABILITIES : uint32_t {
|
||||||
|
X_VIDEO_ENABLE_STEREOSCOPIC_3D_MODE = 0x1,
|
||||||
|
X_VIDEO_ENABLE_STEREOSCOPIC_720P_60HZ_MODE = 0x10
|
||||||
|
};
|
||||||
|
|
||||||
void XGetVideoMode_entry(pointer_t<X_VIDEO_MODE> video_mode) {
|
void XGetVideoMode_entry(pointer_t<X_VIDEO_MODE> video_mode) {
|
||||||
// TODO(benvanik): actually check to see if these are the same.
|
// TODO(benvanik): actually check to see if these are the same.
|
||||||
xboxkrnl::VdQueryVideoMode(video_mode);
|
xboxkrnl::VdQueryVideoMode(video_mode);
|
||||||
}
|
}
|
||||||
DECLARE_XAM_EXPORT1(XGetVideoMode, kVideo, ExportTag::kSketchy);
|
DECLARE_XAM_EXPORT1(XGetVideoMode, kVideo, ExportTag::kSketchy);
|
||||||
|
|
||||||
dword_result_t XGetVideoCapabilities_entry() { return 0; }
|
dword_result_t XGetVideoCapabilities_entry() {
|
||||||
|
uint32_t capabilities = 0;
|
||||||
|
|
||||||
|
if (cvars::enable_3d_mode) {
|
||||||
|
capabilities =
|
||||||
|
static_cast<uint32_t>(
|
||||||
|
X_VIDEO_CAPABILITIES::X_VIDEO_ENABLE_STEREOSCOPIC_3D_MODE) |
|
||||||
|
static_cast<uint32_t>(
|
||||||
|
X_VIDEO_CAPABILITIES::X_VIDEO_ENABLE_STEREOSCOPIC_720P_60HZ_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
|
return capabilities;
|
||||||
|
}
|
||||||
DECLARE_XAM_EXPORT1(XGetVideoCapabilities, kVideo, kStub);
|
DECLARE_XAM_EXPORT1(XGetVideoCapabilities, kVideo, kStub);
|
||||||
|
|
||||||
} // namespace xam
|
} // namespace xam
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue