fix XFB enabled at boot. Should save some click for homebrew.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1893 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
9e676263cd
commit
8ff64a12ea
|
@ -38,19 +38,26 @@ enum {
|
|||
#if XFB_USE_SHADERS
|
||||
|
||||
static GLuint xfb_decoded_texture;
|
||||
static int XFBInitStatus = 0;
|
||||
|
||||
void XFB_Init()
|
||||
{
|
||||
glGenTextures(1, &xfb_decoded_texture);
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, xfb_decoded_texture);
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, XFB_WIDTH, XFB_BUF_HEIGHT, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||
XFBInitStatus = 1;
|
||||
}
|
||||
|
||||
void XFB_Shutdown()
|
||||
{
|
||||
glDeleteTextures(1, &xfb_decoded_texture);
|
||||
XFBInitStatus = 0;
|
||||
}
|
||||
|
||||
int XFB_isInit()
|
||||
{
|
||||
return XFBInitStatus;
|
||||
}
|
||||
|
||||
void XFB_Write(u8 *xfb_in_ram, const TRectangle& sourceRc, u32 dstWd, u32 dstHt)
|
||||
{
|
||||
|
|
|
@ -30,4 +30,6 @@ void XFB_Draw(u8 *xfb_in_ram, u32 width, u32 height, s32 yOffset);
|
|||
|
||||
void XFB_Shutdown();
|
||||
|
||||
int XFB_isInit();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -364,7 +364,8 @@ void Video_UpdateXFB(u8* _pXFB, u32 _dwWidth, u32 _dwHeight, s32 _dwYOffset)
|
|||
{
|
||||
if(g_Config.bUseXFB)
|
||||
{
|
||||
XFB_Draw(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
|
||||
if (XFB_isInit())
|
||||
XFB_Draw(_pXFB, _dwWidth, _dwHeight, _dwYOffset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue