Skip to content

Commit

Permalink
Alkama Customs
Browse files Browse the repository at this point in the history
  • Loading branch information
alkama committed Nov 25, 2023
1 parent 397cef6 commit 4e4fd89
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ int main( int argc, const char * argv[] )
Timer::Start();
float fNextTick = 0.1f;
float fLastTimeMS = Timer::GetTime();
float oldtime = Timer::GetTime() / 1000.0;
while ( !Renderer::WantsToQuit() )
{
bool newShader = false;
Expand Down Expand Up @@ -596,10 +597,18 @@ int main( int argc, const char * argv[] )
}
}

char frame_ms[10];
snprintf(frame_ms, sizeof(frame_ms), "%.2f", (time - oldtime) * 1000.0f);

char szLayout[ 255 ];
Misc::GetKeymapName( szLayout );
std::string sHelp = "F2 - toggle texture preview F5 or Ctrl-R - recompile shader F11 - hide GUI Current keymap: ";
sHelp += szLayout;
//std::string sHelp = "F2 - toggle texture preview F5 or Ctrl-R - recompile shader F11 - hide GUI Current keymap: ";
//sHelp += szLayout;
//sHelp += " ";

std::string sHelp = "Bonzomatic GLSL ( ";
sHelp += frame_ms;
sHelp += "ms )";
surface->DrawTextNoClip( Scintilla::PRectangle( 20, Renderer::nHeight - 20, 100, Renderer::nHeight ), *mShaderEditor.GetTextFont(), Renderer::nHeight - 5.0, sHelp.c_str(), (int) sHelp.length(), 0x80FFFFFF, 0x00000000 );
}

Expand All @@ -625,6 +634,7 @@ int main( int argc, const char * argv[] )
mDebugOutput.SetText( "Unable to save shader! Your work will be lost when you quit!" );
}
}
oldtime = time;
}


Expand Down

0 comments on commit 4e4fd89

Please sign in to comment.