mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-02 00:42:24 +00:00
Use the old and faster 1.5x scaler when available
svn-id: r27455
This commit is contained in:
parent
6e9200f739
commit
7a5b89309e
@ -131,8 +131,7 @@ private:
|
||||
void calc_scale();
|
||||
|
||||
void render_landscapeAny(RectangleType &r, PointType &p);
|
||||
void render_landscape(RectangleType &r, PointType &p);
|
||||
void render_portrait(RectangleType &r, PointType &p);
|
||||
void render_landscape15x(RectangleType &r, PointType &p);
|
||||
void render_1x(RectangleType &r, PointType &p);
|
||||
WinHandle alloc_screen(Coord w, Coord h);
|
||||
virtual void draw_osd(UInt16 id, Int32 x, Int32 y, Boolean show, UInt8 color = 0);
|
||||
|
@ -137,9 +137,13 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) {
|
||||
}
|
||||
|
||||
if (_stretched) {
|
||||
calc_scale();
|
||||
OPTIONS_SET(kOptDisableOnScrDisp);
|
||||
_render = &OSystem_PalmOS5::render_landscapeAny;
|
||||
if (_screenHeight == 200 && _screenDest.h == 300) {
|
||||
_render = &OSystem_PalmOS5::render_landscape15x;
|
||||
} else {
|
||||
_render = &OSystem_PalmOS5::render_landscapeAny;
|
||||
calc_scale();
|
||||
}
|
||||
} else {
|
||||
OPTIONS_RST(kOptDisableOnScrDisp);
|
||||
_render = &OSystem_PalmOS5::render_1x;
|
||||
|
@ -76,3 +76,43 @@ void OSystem_PalmOS5::render_landscapeAny(RectangleType &r, PointType &p) {
|
||||
p.y = _screenOffset.y + o;
|
||||
RctSetRectangle(&r, 0, 0, _screenDest.w, _screenDest.h - o);
|
||||
}
|
||||
|
||||
void OSystem_PalmOS5::render_landscape15x(RectangleType &r, PointType &p) {
|
||||
Coord x, y, o = 0;
|
||||
int16 *dst = _workScreenP;
|
||||
|
||||
if (_overlayVisible) {
|
||||
int16 *src = _overlayP;
|
||||
|
||||
for (y = 0; y < 100; y++) {
|
||||
// draw 2 lines
|
||||
for (x = 0; x < 320; x++) {
|
||||
*dst++ = *src++;
|
||||
*dst++ = *src;
|
||||
*dst++ = *src++;
|
||||
}
|
||||
// copy the second to the next line
|
||||
MemMove(dst, dst - 480, 480 * 2);
|
||||
dst += 480;
|
||||
}
|
||||
} else {
|
||||
byte *src = _offScreenP;
|
||||
o = _current_shake_pos;
|
||||
|
||||
for (y = 0; y < 100; y++) {
|
||||
// draw 2 lines
|
||||
for (x = 0; x < 320; x++) {
|
||||
*dst++ = _nativePal[*src++];
|
||||
*dst++ = _nativePal[*src];
|
||||
*dst++ = _nativePal[*src++];
|
||||
}
|
||||
// copy the second to the next line
|
||||
MemMove(dst, dst - 480, 480 * 2);
|
||||
dst += 480;
|
||||
}
|
||||
}
|
||||
|
||||
p.x = _screenOffset.x;
|
||||
p.y = _screenOffset.y + o;
|
||||
RctSetRectangle(&r, 0, 0, 480, 300 - o);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user