mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 06:50:32 +00:00
(PS3) Create gfx_ctx_get_aspect_ratio
This commit is contained in:
parent
28eb3604f9
commit
e3e3e1f3bc
@ -1050,22 +1050,6 @@ PSGLdevice* psglCreateDeviceExtended(const PSGLdeviceParameters *parameters )
|
||||
return device;
|
||||
}
|
||||
|
||||
GLfloat psglGetDeviceAspectRatio(const PSGLdevice * device)
|
||||
{
|
||||
CellVideoOutState videoState;
|
||||
cellVideoOutGetState(CELL_VIDEO_OUT_PRIMARY, 0, &videoState);
|
||||
|
||||
switch (videoState.displayMode.aspect)
|
||||
{
|
||||
case CELL_VIDEO_OUT_ASPECT_4_3:
|
||||
return 4.0f/3.0f;
|
||||
case CELL_VIDEO_OUT_ASPECT_16_9:
|
||||
return 16.0f/9.0f;
|
||||
}
|
||||
|
||||
return 16.0f/9.0f;
|
||||
}
|
||||
|
||||
void psglGetDeviceDimensions(const PSGLdevice * device, GLuint *width, GLuint *height)
|
||||
{
|
||||
*width = device->deviceParameters.width;
|
||||
|
@ -1005,7 +1005,6 @@ extern void psglExit();
|
||||
|
||||
PSGLdevice *psglCreateDeviceAuto( GLenum colorFormat, GLenum depthFormat, GLenum multisamplingMode );
|
||||
PSGLdevice *psglCreateDeviceExtended( const PSGLdeviceParameters *parameters );
|
||||
GLfloat psglGetDeviceAspectRatio(const PSGLdevice *device );
|
||||
void psglGetDeviceDimensions(const PSGLdevice *device, GLuint *width, GLuint *height );
|
||||
void psglDestroyDevice( PSGLdevice* device );
|
||||
|
||||
|
@ -58,6 +58,22 @@ unsigned gfx_ctx_get_resolution_height(unsigned resolution_id)
|
||||
return resolution.height;
|
||||
}
|
||||
|
||||
float gfx_ctx_get_aspect_ratio(void)
|
||||
{
|
||||
CellVideoOutState videoState;
|
||||
cellVideoOutGetState(CELL_VIDEO_OUT_PRIMARY, 0, &videoState);
|
||||
|
||||
switch (videoState.displayMode.aspect)
|
||||
{
|
||||
case CELL_VIDEO_OUT_ASPECT_4_3:
|
||||
return 4.0f/3.0f;
|
||||
case CELL_VIDEO_OUT_ASPECT_16_9:
|
||||
return 16.0f/9.0f;
|
||||
}
|
||||
|
||||
return 16.0f/9.0f;
|
||||
}
|
||||
|
||||
void gfx_ctx_get_available_resolutions (void)
|
||||
{
|
||||
bool defaultresolution;
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
void gfx_ctx_get_available_resolutions (void);
|
||||
int gfx_ctx_check_resolution(unsigned resolution_id);
|
||||
float gfx_ctx_get_aspect_ratio(void);
|
||||
unsigned gfx_ctx_get_resolution_width(unsigned resolution_id);
|
||||
unsigned gfx_ctx_get_resolution_height(unsigned resolution_id);
|
||||
void gfx_ctx_set_projection(gl_t *gl, const struct gl_ortho *ortho, bool allow_rotate);
|
||||
|
Loading…
Reference in New Issue
Block a user