diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp
index 60490793c9..e84397a417 100644
--- a/360/xdk360_video.cpp
+++ b/360/xdk360_video.cpp
@@ -108,7 +108,6 @@ const DWORD g_MapLinearToSrgbGpuFormat[] =
struct XPR_HEADER
{
- unsigned long dwMagic;
unsigned long dwHeaderSize;
unsigned long dwDataSize;
};
@@ -165,13 +164,6 @@ HRESULT PackedResource::Create( const char * strFilename )
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
m_dwSysMemDataSize = xprh.dwHeaderSize;
m_dwVidMemDataSize = xprh.dwDataSize;
diff --git a/console/griffin/griffin.c b/console/griffin/griffin.c
index 039a626ed4..fd07a557c5 100644
--- a/console/griffin/griffin.c
+++ b/console/griffin/griffin.c
@@ -43,11 +43,8 @@ CONFIG FILE
/*============================================================
VIDEO
============================================================ */
-#ifdef HAVE_OPENGL
-#include "../../gfx/gl_common.c"
-#endif
-
#if defined(__CELLOS_LV2__)
+#include "../../gfx/context/ps3_ctx.c"
#include "../../gfx/shader_cg.c"
#include "../../ps3/ps3_video_psgl.c"
#include "../../ps3/image.c"
diff --git a/gfx/gl_common.c b/gfx/context/ps3_ctx.c
similarity index 69%
rename from gfx/gl_common.c
rename to gfx/context/ps3_ctx.c
index aa749c545c..5b0831b390 100644
--- a/gfx/gl_common.c
+++ b/gfx/context/ps3_ctx.c
@@ -14,25 +14,32 @@
* If not, see .
*/
-#include "../driver.h"
+#include "../../driver.h"
#include
-#include "gl_common.h"
-#include "gfx_common.h"
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-/*============================================================
- VIDEO
-============================================================ */
+#include "../gl_common.h"
-void rarch_gl_set_vsync(unsigned enabled)
+#include "ps3_ctx.h"
+
+void gfx_ctx_set_swap_interval(unsigned interval, bool inited)
{
- if(enabled)
- glEnable(GL_VSYNC_SCE);
- else
- glDisable(GL_VSYNC_SCE);
+ bool success = false;
+
+ if(inited)
+ {
+ success = true;
+
+ if (interval)
+ glEnable(GL_VSYNC_SCE);
+ else
+ glDisable(GL_VSYNC_SCE);
+ }
+
+ if (!success)
+ RARCH_WARN("Failed to set swap interval.\n");
}
diff --git a/gfx/context/ps3_ctx.h b/gfx/context/ps3_ctx.h
new file mode 100644
index 0000000000..6092f321bc
--- /dev/null
+++ b/gfx/context/ps3_ctx.h
@@ -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 .
+ */
+
+#ifndef _PS3_CTX_H
+#define _PS3_CTX_H
+
+#endif
diff --git a/ps3/menu.c b/ps3/menu.c
index d820c564ac..4a57df5a0f 100644
--- a/ps3/menu.c
+++ b/ps3/menu.c
@@ -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))
{
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;
}
if(CTRL_START(state))
{
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;
}
break;