Apply patch for bug #1698312 "PSP: 435x272 resolution cursor misalignement"

svn-id: r26931
This commit is contained in:
Joost Peters 2007-05-24 19:44:46 +00:00
parent 8998e0d40d
commit f175f17481
2 changed files with 9 additions and 6 deletions

View File

@ -63,7 +63,7 @@ static int timer_handler(int t) {
const OSystem::GraphicsMode OSystem_PSP::s_supportedGraphicsModes[] = {
{ "320x200 (centered)", "320x200 16-bit centered", CENTERED_320X200 },
{ "353x272 (best-fit, centered)", "353x272 16-bit centered", CENTERED_435X272 },
{ "435x272 (best-fit, centered)", "435x272 16-bit centered", CENTERED_435X272 },
{ "480x272 (full screen)", "480x272 16-bit stretched", STRETCHED_480X272 },
{ "362x272 (4:3, centered)", "362x272 16-bit centered", CENTERED_362X272 },
{0, 0, 0}

View File

@ -267,8 +267,6 @@ void OSystem_PSP_GU::copyRectToScreen(const byte *buf, int pitch, int x, int y,
}
void OSystem_PSP_GU::updateScreen() {
float scale;
sceGuStart(0,list);
sceGuClearColor(0xff000000);
@ -381,9 +379,14 @@ void OSystem_PSP_GU::updateScreen() {
break;
case CENTERED_435X272:
{
scale = 435.0f / _screenWidth;
vertices[0].x = (PSP_SCREEN_WIDTH - 435) / 2 + mX * scale; vertices[0].y = mY * scale; vertices[0].z = 0;
vertices[1].x = vertices[0].x + _mouseWidth * scale; vertices[1].y = vertices[0].y + _mouseHeight * scale; vertices[0].z = 0;
float scalex, scaley;
scalex = 435.0f / _screenWidth;
scaley = 272.0f / _screenHeight;
vertices[0].x = (PSP_SCREEN_WIDTH - 435) / 2 + mX * scalex; vertices[0].y = mY * scaley; vertices[0].z = 0;
vertices[1].x = vertices[0].x + _mouseWidth * scalex; vertices[1].y = vertices[0].y + _mouseHeight * scaley; vertices[0].z = 0;
}
break;
case CENTERED_362X272: