diff --git a/stepmania/src/RageDisplay.cpp b/stepmania/src/RageDisplay.cpp index f6236bf9ac..ab81329742 100644 --- a/stepmania/src/RageDisplay.cpp +++ b/stepmania/src/RageDisplay.cpp @@ -65,6 +65,7 @@ static const char *PixelFormatNames[] = { "PAL", "BGR8", "A1BGR5", + "X1RGB5", }; XToString( PixelFormat ); diff --git a/stepmania/src/RageDisplay.h b/stepmania/src/RageDisplay.h index 62c75764d5..fd5faa5813 100644 --- a/stepmania/src/RageDisplay.h +++ b/stepmania/src/RageDisplay.h @@ -64,6 +64,7 @@ enum PixelFormat * directly; they'll be matched automatically by FindPixelFormat. */ PixelFormat_BGR8, PixelFormat_A1BGR5, + PixelFormat_X1RGB5, NUM_PixelFormat, PixelFormat_Invalid }; diff --git a/stepmania/src/RageDisplay_D3D.cpp b/stepmania/src/RageDisplay_D3D.cpp index a36f838877..3eccc2dbce 100644 --- a/stepmania/src/RageDisplay_D3D.cpp +++ b/stepmania/src/RageDisplay_D3D.cpp @@ -168,6 +168,9 @@ static const RageDisplay::PixelFormatDesc PIXEL_FORMAT_DESC[NUM_PixelFormat] = { }, { /* ABGR (N/A; OpenGL only) */ 0, { 0,0,0,0 } + }, { + /* X1R5G5B5 */ + 0, { 0,0,0,0 } } }; @@ -184,7 +187,8 @@ static D3DFORMAT D3DFORMATS[NUM_PixelFormat] = #endif D3DFMT_P8, D3DFMT_UNKNOWN, /* no BGR */ - D3DFMT_UNKNOWN /* no ABGR */ + D3DFMT_UNKNOWN, /* no ABGR */ + D3DFMT_UNKNOWN, /* X1R5G5B5 */ }; const RageDisplay::PixelFormatDesc *RageDisplay_D3D::GetPixelFormatDesc(PixelFormat pf) const diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 7e05410fa5..2c34cfb702 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -119,6 +119,13 @@ static RageDisplay::PixelFormatDesc PIXEL_FORMAT_DESC[NUM_PixelFormat] = { 0x03E0, 0x001F, 0x8000 }, + }, { + /* X1R5G5B5 */ + 16, + { 0x7C00, + 0x03E0, + 0x001F, + 0x0000 }, } }; @@ -177,6 +184,11 @@ struct GLPixFmtInfo_t { GL_RGB5_A1, GL_BGRA, GL_UNSIGNED_SHORT_1_5_5_5_REV, + }, { + /* X1R5G5B5 */ + GL_RGB5, + GL_BGRA, + GL_UNSIGNED_SHORT_1_5_5_5_REV, } };