| 123 | } |
| 124 | |
| 125 | void gfxInit(GSPGPU_FramebufferFormat topFormat, GSPGPU_FramebufferFormat bottomFormat, bool vrambuffers) |
| 126 | { |
| 127 | if (vrambuffers) |
| 128 | { |
| 129 | screenAlloc = vramAlloc; |
| 130 | screenFree = vramFree; |
| 131 | gfxIsVram = true; |
| 132 | } |
| 133 | else |
| 134 | { |
| 135 | screenAlloc = linearAlloc; |
| 136 | screenFree = linearFree; |
| 137 | gfxIsVram = false; |
| 138 | } |
| 139 | |
| 140 | // Initialize GSP |
| 141 | gspInit(); |
| 142 | |
| 143 | // Initialize configuration |
| 144 | gfxSet3D(false); |
| 145 | gfxSetScreenFormat(GFX_TOP, topFormat); |
| 146 | gfxSetScreenFormat(GFX_BOTTOM, bottomFormat); |
| 147 | gfxSetDoubleBuffering(GFX_TOP, true); |
| 148 | gfxSetDoubleBuffering(GFX_BOTTOM, true); |
| 149 | |
| 150 | // Present the framebuffers |
| 151 | gfxCurBuf[0] = gfxCurBuf[1] = 0; |
| 152 | gfxPresentFramebuffer(GFX_TOP, 0, false); |
| 153 | gfxPresentFramebuffer(GFX_BOTTOM, 0, false); |
| 154 | |
| 155 | // Wait for VBlank and turn the LCD on |
| 156 | gspWaitForVBlank(); |
| 157 | GSPGPU_SetLcdForceBlack(0x0); |
| 158 | } |
| 159 | |
| 160 | void gfxInitDefault(void) |
| 161 | { |
no test coverage detected