- if (PSXDisplay.DisplayMode.x != fbw || PSXDisplay.DisplayMode.y != fbh
- || PSXDisplay.RGB24 != fb24bpp) {
+ /* careful if rearranging this code, we try to set mode and flip
+ * to get the hardware apply both changes at the same time */
+ if (PSXDisplay.DisplayMode.x != fbw || PSXDisplay.RGB24 != fb24bpp) {
+ int fbh = PSXDisplay.DisplayMode.y;