diff --git a/source/Engine/Application.cpp b/source/Engine/Application.cpp index f5a6c5b..93aaed5 100644 --- a/source/Engine/Application.cpp +++ b/source/Engine/Application.cpp @@ -979,7 +979,7 @@ PRIVATE STATIC void Application::RunFrame(void* p) { Graphics::Save(); Graphics::Translate(infoW - infoPadding - (8 * 16.0 * 0.85), infoPadding, 0.0); Graphics::Scale(0.85, 0.85, 1.0); - snprintf(textBuffer, 256, "FPS: %03.1f", TargetFPS); + snprintf(textBuffer, 256, "FPS: %03.1f", CurrentFPS); DEBUG_DrawText(textBuffer, 0.0, 0.0); Graphics::Restore(); diff --git a/source/Engine/Bytecode/ScriptManager.cpp b/source/Engine/Bytecode/ScriptManager.cpp index 6c4928f..407ef1b 100644 --- a/source/Engine/Bytecode/ScriptManager.cpp +++ b/source/Engine/Bytecode/ScriptManager.cpp @@ -75,9 +75,7 @@ vector ScriptManager::ClassImplList; SDL_mutex* ScriptManager::GlobalLock = NULL; -#ifdef VM_DEBUG static Uint32 VMBranchLimit = 0; -#endif // #define DEBUG_STRESS_GC diff --git a/source/Engine/Bytecode/VMThread.cpp b/source/Engine/Bytecode/VMThread.cpp index 5f8d9f0..92c79c1 100644 --- a/source/Engine/Bytecode/VMThread.cpp +++ b/source/Engine/Bytecode/VMThread.cpp @@ -324,6 +324,16 @@ PUBLIC VMValue VMThread::ReadConstant(CallFrame* frame) { return (*frame->Function->Chunk.Constants)[ReadUInt32(frame)]; } +#define DO_RETURN() { \ + FrameCount--; \ + if (FrameCount == ReturnFrame) { \ + return INTERPRET_FINISHED; \ + } \ + StackTop = frame->Slots; \ + Push(InterpretResult); \ + frame = &Frames[FrameCount - 1]; \ +} + #ifdef VM_DEBUG PUBLIC bool VMThread::ShowBranchLimitMessage(const char* errorMessage, ...) { va_list args; @@ -401,16 +411,6 @@ PRIVATE bool VMThread::DoJumpBack(CallFrame* frame, int offset) { return CheckBranchLimit(frame); } -#define DO_RETURN() { \ - FrameCount--; \ - if (FrameCount == ReturnFrame) { \ - return INTERPRET_FINISHED; \ - } \ - StackTop = frame->Slots; \ - Push(InterpretResult); \ - frame = &Frames[FrameCount - 1]; \ -} - #define JUMP(offset) \ { \ if (DoJump(frame, offset) == false) { \ diff --git a/source/Engine/Input/Input.h b/source/Engine/Input/Input.h index e19f574..b88fa2d 100644 --- a/source/Engine/Input/Input.h +++ b/source/Engine/Input/Input.h @@ -218,6 +218,8 @@ class InputBind { virtual bool IsDefined() const = 0; virtual InputBind* Clone() const = 0; + + virtual ~InputBind() = default; }; class KeyboardBind : public InputBind {