Add Cardboard VR
Based on hrydgard/ppsspp/pull/12449
This commit is contained in:
committed by
SachinVin
parent
da3a9bfc96
commit
60235827c5
@ -9,6 +9,13 @@
|
||||
|
||||
namespace Layout {
|
||||
|
||||
/// Describes the horizontal coordinates for the right eye screen when using Cardboard VR
|
||||
struct CardboardSettings {
|
||||
float top_screen_right_eye;
|
||||
float bottom_screen_right_eye;
|
||||
float user_x_shift;
|
||||
};
|
||||
|
||||
/// Describes the layout of the window framebuffer (size and top/bottom screen positions)
|
||||
struct FramebufferLayout {
|
||||
u32 width;
|
||||
@ -19,6 +26,8 @@ struct FramebufferLayout {
|
||||
Common::Rectangle<u32> bottom_screen;
|
||||
bool is_rotated = true;
|
||||
|
||||
CardboardSettings cardboard;
|
||||
|
||||
/**
|
||||
* Returns the ration of pixel size of the top screen, compared to the native size of the 3DS
|
||||
* screen.
|
||||
@ -104,6 +113,13 @@ FramebufferLayout CustomFrameLayout(u32 width, u32 height);
|
||||
*/
|
||||
FramebufferLayout FrameLayoutFromResolutionScale(u32 res_scale);
|
||||
|
||||
/**
|
||||
* Convenience method for transforming a frame layout when using Cardboard VR
|
||||
* @param layout frame layout to transform
|
||||
* @return layout transformed with the user cardboard settings
|
||||
*/
|
||||
FramebufferLayout GetCardboardSettings(FramebufferLayout layout);
|
||||
|
||||
std::pair<unsigned, unsigned> GetMinimumSizeFromLayout(Settings::LayoutOption layout,
|
||||
bool upright_screen);
|
||||
|
||||
|
Reference in New Issue
Block a user