GTK GUI :

- Disabled RGB overlays in the Xv module since it was buggy
- Properly initialize autofire state


git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@554 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
bgk 2008-06-01 16:43:27 +00:00
parent 33d0ce63b3
commit 05b3595663
2 changed files with 12 additions and 6 deletions

View File

@ -43,8 +43,6 @@ ScreenAreaXv::ScreenAreaXv(int _iWidth, int _iHeight, int _iScale) :
{ {
XvAdaptorInfo *pAdaptors; XvAdaptorInfo *pAdaptors;
unsigned int iNumAdaptors; unsigned int iNumAdaptors;
XvImageFormatValues *pFormats;
int iNumFormats;
GdkWindow *pRoot; GdkWindow *pRoot;
memset(&m_oShm, 0, sizeof(m_oShm)); memset(&m_oShm, 0, sizeof(m_oShm));
@ -82,22 +80,29 @@ ScreenAreaXv::ScreenAreaXv(int _iWidth, int _iHeight, int _iScale) :
throw std::exception(); throw std::exception();
} }
/* Try to find an RGB format */
pFormats = XvListImageFormats(m_pDisplay, m_iXvPortId, &iNumFormats);
m_iFormat = FOURCC_YUY2; m_iFormat = FOURCC_YUY2;
/* FIXME: RGB mode is disabled for now. Someone with a graphic card that allows
RGB overlays should try to fix it.
XvImageFormatValues *pFormats;
int iNumFormats;
// Try to find an RGB format
pFormats = XvListImageFormats(m_pDisplay, m_iXvPortId, &iNumFormats);
for (int i = 0; i < iNumFormats; i++) for (int i = 0; i < iNumFormats; i++)
{ {
if (pFormats[i].id == 0x3 || pFormats[i].type == XvRGB) if (pFormats[i].id == 0x3 || pFormats[i].type == XvRGB)
{ {
/* Try to find a 32-bit mode */ // Try to find a 32-bit mode
if (pFormats[i].bits_per_pixel == 32) if (pFormats[i].bits_per_pixel == 32)
{ {
m_iFormat = pFormats[i].id; m_iFormat = pFormats[i].id;
} }
} }
} }
*/
Atom oAtom = XInternAtom(m_pDisplay, "XV_AUTOPAINT_COLORKEY", True); Atom oAtom = XInternAtom(m_pDisplay, "XV_AUTOPAINT_COLORKEY", True);
if (oAtom != None) if (oAtom != None)

View File

@ -98,6 +98,7 @@ Window::Window(GtkWindow * _pstWindow, const Glib::RefPtr<Xml> & _poXml) :
m_iScreenHeight = m_iGBAScreenHeight; m_iScreenHeight = m_iGBAScreenHeight;
m_eCartridge = CartridgeNone; m_eCartridge = CartridgeNone;
m_uiJoypadState = 0; m_uiJoypadState = 0;
m_uiAutofireState = 0;
m_poKeymap = NULL; m_poKeymap = NULL;
vInitSystem(); vInitSystem();