mirror of
https://github.com/libretro/RetroArch
synced 2025-03-18 04:21:19 +00:00
(PS3)_Made ps3_ctx file - implemented set_swap_interval function -
removed gl_common.c
This commit is contained in:
parent
8f74b1a555
commit
97b966ab59
@ -108,7 +108,6 @@ const DWORD g_MapLinearToSrgbGpuFormat[] =
|
|||||||
|
|
||||||
struct XPR_HEADER
|
struct XPR_HEADER
|
||||||
{
|
{
|
||||||
unsigned long dwMagic;
|
|
||||||
unsigned long dwHeaderSize;
|
unsigned long dwHeaderSize;
|
||||||
unsigned long dwDataSize;
|
unsigned long dwDataSize;
|
||||||
};
|
};
|
||||||
@ -165,13 +164,6 @@ HRESULT PackedResource::Create( const char * strFilename )
|
|||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xprh.dwMagic != XPR2_MAGIC_VALUE )
|
|
||||||
{
|
|
||||||
RARCH_ERR( "Invalid Xbox Packed Resource (.xpr) file: Magic = 0x%08lx.\n", xprh.dwMagic );
|
|
||||||
CloseHandle( hFile );
|
|
||||||
return E_FAIL;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Compute memory requirements
|
// Compute memory requirements
|
||||||
m_dwSysMemDataSize = xprh.dwHeaderSize;
|
m_dwSysMemDataSize = xprh.dwHeaderSize;
|
||||||
m_dwVidMemDataSize = xprh.dwDataSize;
|
m_dwVidMemDataSize = xprh.dwDataSize;
|
||||||
|
@ -43,11 +43,8 @@ CONFIG FILE
|
|||||||
/*============================================================
|
/*============================================================
|
||||||
VIDEO
|
VIDEO
|
||||||
============================================================ */
|
============================================================ */
|
||||||
#ifdef HAVE_OPENGL
|
|
||||||
#include "../../gfx/gl_common.c"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__CELLOS_LV2__)
|
#if defined(__CELLOS_LV2__)
|
||||||
|
#include "../../gfx/context/ps3_ctx.c"
|
||||||
#include "../../gfx/shader_cg.c"
|
#include "../../gfx/shader_cg.c"
|
||||||
#include "../../ps3/ps3_video_psgl.c"
|
#include "../../ps3/ps3_video_psgl.c"
|
||||||
#include "../../ps3/image.c"
|
#include "../../ps3/image.c"
|
||||||
|
@ -14,25 +14,32 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../driver.h"
|
#include "../../driver.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "gl_common.h"
|
|
||||||
#include "gfx_common.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*============================================================
|
#include "../gl_common.h"
|
||||||
VIDEO
|
|
||||||
============================================================ */
|
|
||||||
|
|
||||||
void rarch_gl_set_vsync(unsigned enabled)
|
#include "ps3_ctx.h"
|
||||||
|
|
||||||
|
void gfx_ctx_set_swap_interval(unsigned interval, bool inited)
|
||||||
{
|
{
|
||||||
if(enabled)
|
bool success = false;
|
||||||
glEnable(GL_VSYNC_SCE);
|
|
||||||
else
|
if(inited)
|
||||||
glDisable(GL_VSYNC_SCE);
|
{
|
||||||
|
success = true;
|
||||||
|
|
||||||
|
if (interval)
|
||||||
|
glEnable(GL_VSYNC_SCE);
|
||||||
|
else
|
||||||
|
glDisable(GL_VSYNC_SCE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!success)
|
||||||
|
RARCH_WARN("Failed to set swap interval.\n");
|
||||||
}
|
}
|
20
gfx/context/ps3_ctx.h
Normal file
20
gfx/context/ps3_ctx.h
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* RetroArch - A frontend for libretro.
|
||||||
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
||||||
|
* Copyright (C) 2011-2012 - Daniel De Matteis
|
||||||
|
*
|
||||||
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||||
|
* of the GNU General Public License as published by the Free Software Found-
|
||||||
|
* ation, either version 3 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
* PURPOSE. See the GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||||
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _PS3_CTX_H
|
||||||
|
#define _PS3_CTX_H
|
||||||
|
|
||||||
|
#endif
|
@ -1428,13 +1428,13 @@ static void producesettingentry(menu * menu_obj, uint64_t switchvalue)
|
|||||||
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
if(CTRL_LEFT(state) || CTRL_LSTICK_LEFT(state) || CTRL_RIGHT(state) || CTRL_LSTICK_RIGHT(state))
|
||||||
{
|
{
|
||||||
g_console.throttle_enable = !g_console.throttle_enable;
|
g_console.throttle_enable = !g_console.throttle_enable;
|
||||||
rarch_gl_set_vsync(g_console.throttle_enable);
|
gfx_ctx_set_swap_interval(g_console.throttle_enable, true);
|
||||||
set_delay = DELAY_MEDIUM;
|
set_delay = DELAY_MEDIUM;
|
||||||
}
|
}
|
||||||
if(CTRL_START(state))
|
if(CTRL_START(state))
|
||||||
{
|
{
|
||||||
g_console.throttle_enable = true;
|
g_console.throttle_enable = true;
|
||||||
rarch_gl_set_vsync(g_console.throttle_enable);
|
gfx_ctx_set_swap_interval(g_console.throttle_enable, true);
|
||||||
set_delay = DELAY_MEDIUM;
|
set_delay = DELAY_MEDIUM;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user