Cleaned up a few unused variables. Added blit and render counters to help debug if GUI rendering is on time with emulation thread.
This commit is contained in:
parent
0b7c7f1924
commit
572e89ee90
|
@ -653,5 +653,6 @@ void ConsoleViewGL_t::paintGL(void)
|
|||
glDisable(GL_TEXTURE_2D);
|
||||
glDisable(GL_TEXTURE_RECTANGLE);
|
||||
|
||||
nes_shm->render_count++;
|
||||
//printf("Paint GL!\n");
|
||||
}
|
||||
|
|
|
@ -650,4 +650,5 @@ void ConsoleViewSDL_t::render(void)
|
|||
|
||||
SDL_RenderPresent(sdlRenderer);
|
||||
|
||||
nes_shm->render_count++;
|
||||
}
|
||||
|
|
|
@ -3914,7 +3914,6 @@ void consoleWin_t::syncActionConfig( QAction *act, const char *property )
|
|||
|
||||
void consoleWin_t::updatePeriodic(void)
|
||||
{
|
||||
|
||||
// Process all events before attempting to render viewport
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
|
|
|
@ -34,36 +34,6 @@ struct nes_shm_t
|
|||
char runEmulator;
|
||||
char blitUpdated;
|
||||
|
||||
// Pass Key Events back to QT Gui
|
||||
struct
|
||||
{
|
||||
int head;
|
||||
int tail;
|
||||
|
||||
struct {
|
||||
int type;
|
||||
int keycode;
|
||||
int state;
|
||||
} data[64];
|
||||
|
||||
} keyEventBuf;
|
||||
|
||||
// Gui Command Event Queue
|
||||
struct
|
||||
{
|
||||
int head;
|
||||
int tail;
|
||||
|
||||
struct {
|
||||
int id;
|
||||
|
||||
union {
|
||||
int i32[4];
|
||||
float f32[4];
|
||||
} param;
|
||||
} cmd[64];
|
||||
} guiEvent;
|
||||
|
||||
uint32_t pixbuf[1048576]; // 1024 x 1024
|
||||
|
||||
void clear_pixbuf(void)
|
||||
|
@ -71,19 +41,19 @@ struct nes_shm_t
|
|||
memset( pixbuf, 0, sizeof(pixbuf) );
|
||||
}
|
||||
|
||||
struct sndBuf_t
|
||||
{
|
||||
int head;
|
||||
int tail;
|
||||
int16_t data[NES_AUDIO_BUFLEN];
|
||||
unsigned int starveCounter;
|
||||
} sndBuf;
|
||||
struct sndBuf_t
|
||||
{
|
||||
int head;
|
||||
int tail;
|
||||
int16_t data[NES_AUDIO_BUFLEN];
|
||||
unsigned int starveCounter;
|
||||
} sndBuf;
|
||||
|
||||
void push_sound_sample( int16_t sample )
|
||||
{
|
||||
sndBuf.data[ sndBuf.head ] = sample;
|
||||
sndBuf.head = (sndBuf.head + 1) % NES_AUDIO_BUFLEN;
|
||||
}
|
||||
void push_sound_sample( int16_t sample )
|
||||
{
|
||||
sndBuf.data[ sndBuf.head ] = sample;
|
||||
sndBuf.head = (sndBuf.head + 1) % NES_AUDIO_BUFLEN;
|
||||
}
|
||||
};
|
||||
|
||||
extern nes_shm_t *nes_shm;
|
||||
|
|
|
@ -265,6 +265,7 @@ int InitVideo(FCEUGI *gi)
|
|||
nes_shm->video.yscale = 1;
|
||||
break;
|
||||
}
|
||||
nes_shm->render_count = nes_shm->blit_count = 0;
|
||||
|
||||
s_inited = 1;
|
||||
|
||||
|
@ -475,6 +476,7 @@ BlitScreen(uint8 *XBuf)
|
|||
{
|
||||
Blit8ToHigh(XBuf + NOFFSET, dest, bw, s_tlines, pitch, ixScale, iyScale);
|
||||
}
|
||||
nes_shm->blit_count++;
|
||||
nes_shm->blitUpdated = 1;
|
||||
|
||||
aviRecordAddFrame();
|
||||
|
|
Loading…
Reference in New Issue