diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-05-10 02:21:02 +0200 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-05-10 02:21:02 +0200 |
commit | f54f54fb7e640a339433e72fb7406ba8cd2d91bc (patch) | |
tree | 5fc581fccf68dad31449497180628c2a211f141b /src/wx | |
parent | 63e15d248088d861dbde8a8ee152385c0dd80669 (diff) |
add support for writing to VCount. incl. fucked-up display and altering framerate accordingly.
Diffstat (limited to 'src/wx')
-rw-r--r-- | src/wx/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/wx/main.cpp b/src/wx/main.cpp index 9864382..e07d3c9 100644 --- a/src/wx/main.cpp +++ b/src/wx/main.cpp @@ -386,7 +386,7 @@ wxThread::ExitCode EmuThread::Entry() if (emustatus == 1) { - NDS::RunFrame(); + u32 nlines = NDS::RunFrame(); SDL_LockTexture(sdltex, NULL, &texpixels, &texstride); if (texstride == 256*4) @@ -410,7 +410,9 @@ wxThread::ExitCode EmuThread::Entry() SDL_RenderPresent(sdlrend); // framerate limiter based off SDL2_gfx - float framerate = 1000.0f / 60.0f; + float framerate; + if (nlines == 263) framerate = 1000.0f / 60.0f; + else framerate = 1000.0f / ((60.0f * nlines) / 263.0f); fpslimitcount++; u32 curtick = SDL_GetTicks(); |