Debugging functions.
This commit is contained in:
@@ -15,8 +15,9 @@
|
||||
#include "ui/ui.h"
|
||||
#include "debug/debug.h"
|
||||
#include "display/text.h"
|
||||
#include "assert/assert.h"
|
||||
|
||||
display_t DISPLAY;
|
||||
display_t DISPLAY = { 0 };
|
||||
|
||||
errorret_t displayInit(void) {
|
||||
#if DISPLAY_SDL2
|
||||
@@ -69,6 +70,42 @@ errorret_t displayInit(void) {
|
||||
glEnableClientState(GL_COLOR_ARRAY);// To confirm: every frame on PSP?
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glEnableClientState(GL_VERTEX_ARRAY);
|
||||
|
||||
#elif DOLPHIN
|
||||
|
||||
VIDEO_Init();
|
||||
DISPLAY.screenMode = VIDEO_GetPreferredMode(NULL);
|
||||
DISPLAY.frameBuffer = MEM_K0_TO_K1(
|
||||
SYS_AllocateFramebuffer(DISPLAY.screenMode)
|
||||
);
|
||||
VIDEO_Configure(DISPLAY.screenMode);
|
||||
|
||||
VIDEO_SetNextFramebuffer(DISPLAY.frameBuffer);
|
||||
VIDEO_SetBlack(FALSE);
|
||||
VIDEO_Flush();
|
||||
VIDEO_WaitVSync();
|
||||
if(DISPLAY.screenMode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
|
||||
// DISPLAY.fifoBuffer = MEM_K0_TO_K1(memalign(32,FIFO_SIZE));
|
||||
// memset(DISPLAY.fifoBuffer, 0, FIFO_SIZE);
|
||||
|
||||
// GX_Init(DISPLAY.fifoBuffer, FIFO_SIZE);
|
||||
// GXColor backgroundColor = {0, 0, 0, 255};
|
||||
// GX_SetCopyClear(backgroundColor, 0x00ffffff);
|
||||
// GX_SetViewport(0,0,DISPLAY.screenMode->fbWidth,DISPLAY.screenMode->efbHeight,0,1);
|
||||
// GX_SetDispCopyYScale((f32)DISPLAY.screenMode->xfbHeight/(f32)DISPLAY.screenMode->efbHeight);
|
||||
// GX_SetScissor(0,0,DISPLAY.screenMode->fbWidth,DISPLAY.screenMode->efbHeight);
|
||||
// GX_SetDispCopySrc(0,0,DISPLAY.screenMode->fbWidth,DISPLAY.screenMode->efbHeight);
|
||||
// GX_SetDispCopyDst(DISPLAY.screenMode->fbWidth,DISPLAY.screenMode->xfbHeight);
|
||||
// GX_SetCopyFilter(DISPLAY.screenMode->aa,DISPLAY.screenMode->sample_pattern,
|
||||
// GX_TRUE,DISPLAY.screenMode->vfilter);
|
||||
// GX_SetFieldMode(DISPLAY.screenMode->field_rendering,
|
||||
// ((DISPLAY.screenMode->viHeight==2*DISPLAY.screenMode->xfbHeight)?GX_ENABLE:GX_DISABLE));
|
||||
|
||||
// GX_SetCullMode(GX_CULL_NONE);
|
||||
// GX_CopyDisp(DISPLAY.frameBuffer,GX_TRUE);
|
||||
// GX_SetDispCopyGamma(GX_GM_1_0);
|
||||
|
||||
#endif
|
||||
|
||||
quadInit();
|
||||
@@ -110,6 +147,9 @@ errorret_t displayUpdate(void) {
|
||||
}
|
||||
|
||||
SDL_GL_MakeCurrent(DISPLAY.window, DISPLAY.glContext);
|
||||
#elif DOLPHIN
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
// Reset state
|
||||
@@ -138,6 +178,9 @@ errorret_t displayUpdate(void) {
|
||||
while((err = glGetError()) != GL_NO_ERROR) {
|
||||
debugPrint("GL Error: %d\n", err);
|
||||
}
|
||||
#elif DOLPHIN
|
||||
VIDEO_WaitVSync();
|
||||
if(DISPLAY.screenMode->viTVMode & VI_NON_INTERLACE) VIDEO_WaitVSync();
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user