mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-07 14:28:18 +01:00
formatting, change when updatescaling() is called
This commit is contained in:
parent
6935483ae4
commit
00a5439321
@ -328,7 +328,6 @@ draw_init ()
|
||||
GX_LoadPosMtxImm (view, GX_PNMTX0);
|
||||
|
||||
GX_InvVtxCache (); // update vertex cache
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
@ -397,7 +396,6 @@ StartGX ()
|
||||
guOrtho(p, vmode->efbHeight/2, -(vmode->efbHeight/2), -(vmode->fbWidth/2), vmode->fbWidth/2, 10, 1000); // matrix, t, b, l, r, n, f
|
||||
GX_LoadProjectionMtx (p, GX_ORTHOGRAPHIC);
|
||||
|
||||
|
||||
GX_CopyDisp (xfb[whichfb], GX_TRUE); // reset xfb
|
||||
}
|
||||
|
||||
@ -437,6 +435,9 @@ UpdateScaling()
|
||||
square[1] = square[4] = (yscale);
|
||||
square[7] = square[10] = (-yscale);
|
||||
draw_init ();
|
||||
|
||||
if(updateScaling)
|
||||
updateScaling--;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -599,8 +600,11 @@ ResetVideo_Emu ()
|
||||
VIDEO_ClearFrameBuffer (rmode, xfb[whichfb], COLOR_BLACK);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
if (rmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
else while (VIDEO_GetNextField()) VIDEO_WaitVSync();
|
||||
if (rmode->viTVMode & VI_NON_INTERLACE)
|
||||
VIDEO_WaitVSync();
|
||||
else
|
||||
while (VIDEO_GetNextField())
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
// reconfigure GX
|
||||
GX_SetViewport (0, 0, rmode->fbWidth, rmode->efbHeight, 0, 1);
|
||||
@ -621,7 +625,7 @@ ResetVideo_Emu ()
|
||||
GX_InitTexObjLOD(&texobj,GX_NEAR,GX_NEAR_MIP_NEAR,2.5,9.0,0.0,GX_FALSE,GX_FALSE,GX_ANISO_1); // original/unfiltered video mode: force texture filtering OFF
|
||||
|
||||
// set aspect ratio
|
||||
UpdateScaling();
|
||||
updateScaling = 5;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -638,8 +642,11 @@ ResetVideo_Menu ()
|
||||
VIDEO_ClearFrameBuffer (vmode, xfb[whichfb], COLOR_BLACK);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
if (vmode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
else while (VIDEO_GetNextField()) VIDEO_WaitVSync();
|
||||
if (vmode->viTVMode & VI_NON_INTERLACE)
|
||||
VIDEO_WaitVSync();
|
||||
else
|
||||
while (VIDEO_GetNextField())
|
||||
VIDEO_WaitVSync();
|
||||
|
||||
GX_SetViewport (0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1);
|
||||
GX_SetDispCopyYScale ((f32) vmode->xfbHeight / (f32) vmode->efbHeight);
|
||||
@ -673,10 +680,7 @@ void RenderFrame(unsigned char *XBuf)
|
||||
|
||||
// zoom has changed
|
||||
if(updateScaling)
|
||||
{
|
||||
UpdateScaling();
|
||||
updateScaling --;
|
||||
}
|
||||
|
||||
int width, height;
|
||||
u16 *texture = (unsigned short *)texturemem;
|
||||
|
Loading…
Reference in New Issue
Block a user