Permalink
Browse files

Merge pull request #1 from elpendor/retroplayer

Added RGB565 support.
  • Loading branch information...
2 parents a88138a + 77a5cf7 commit fb42d6ce55786da267d4a1f05b38b10ba1a0618e @garbear committed Dec 15, 2012
Showing with 15 additions and 7 deletions.
  1. +6 −0 xbmc/cores/RetroPlayer/RetroPlayerVideo.cpp
  2. +7 −6 xbmc/games/GameClient.cpp
  3. +2 −1 xbmc/games/libretro/libretro.h
@@ -189,10 +189,16 @@ bool CRetroPlayerVideo::CheckConfiguration(const DVDVideoPicture &picture)
switch (m_pixelFormat)
{
case RETRO_PIXEL_FORMAT_XRGB8888:
+ CLog::Log(LOGINFO, "RetroPlayerVideo: Pixel Format: XRGB8888");
format = PIX_FMT_ARGB;
break;
+ case RETRO_PIXEL_FORMAT_RGB565:
+ CLog::Log(LOGINFO, "RetroPlayerVideo: Pixel Format: RGB565");
+ format = PIX_FMT_RGB565LE;
+ break;
case RETRO_PIXEL_FORMAT_0RGB1555:
default:
+ CLog::Log(LOGINFO, "RetroPlayerVideo: Pixel Format: RGB1555");
format = PIX_FMT_RGB555LE;
break;
}
@@ -106,12 +106,12 @@ bool CGameClient::Init()
return false;
}
- CLog::Log(LOGERROR, "GameClient: ------------------------------------");
- CLog::Log(LOGERROR, "GameClient: Loaded DLL for %s", ID().c_str());
- CLog::Log(LOGERROR, "GameClient: Client: %s at version %s", m_clientName.c_str(), m_clientVersion.c_str());
- CLog::Log(LOGERROR, "GameClient: Valid extensions: %s", m_validExtensions.c_str());
- CLog::Log(LOGERROR, "GameClient: Allow VFS: %s, require zip: %s", m_bAllowVFS ? "yes" : "no", m_bRequireZip ? "yes" : "no");
- CLog::Log(LOGERROR, "GameClient: ------------------------------------");
+ CLog::Log(LOGINFO, "GameClient: ------------------------------------");
+ CLog::Log(LOGINFO, "GameClient: Loaded DLL for %s", ID().c_str());
+ CLog::Log(LOGINFO, "GameClient: Client: %s at version %s", m_clientName.c_str(), m_clientVersion.c_str());
+ CLog::Log(LOGINFO, "GameClient: Valid extensions: %s", m_validExtensions.c_str());
+ CLog::Log(LOGINFO, "GameClient: Allow VFS: %s, require zip: %s", m_bAllowVFS ? "yes" : "no", m_bRequireZip ? "yes" : "no");
+ CLog::Log(LOGINFO, "GameClient: ------------------------------------");
return true;
}
@@ -519,6 +519,7 @@ bool CGameClient::EnvironmentCallback(unsigned int cmd, void *data)
// Validate the format
switch (pix_fmt)
{
+ case RETRO_PIXEL_FORMAT_RGB565:
case RETRO_PIXEL_FORMAT_0RGB1555: // 5 bit color, high byte must be zero
case RETRO_PIXEL_FORMAT_XRGB8888: // 8 bit color, high byte is ignored
SetPixelFormat(pix_fmt);
@@ -361,7 +361,8 @@ enum retro_key
enum retro_pixel_format
{
RETRO_PIXEL_FORMAT_0RGB1555 = 0, // 0RGB1555, native endian. 0 bit must be set to 0.
- RETRO_PIXEL_FORMAT_XRGB8888 // XRGB8888, native endian. X bits are ignored.
+ RETRO_PIXEL_FORMAT_XRGB8888, // XRGB8888, native endian. X bits are ignored.
+ RETRO_PIXEL_FORMAT_RGB565
};
struct retro_message

0 comments on commit fb42d6c

Please sign in to comment.