Show version number on title screen

This commit is contained in:
Simon 2020-04-15 22:55:43 +01:00
parent 46c9900185
commit 04591e38d4
5 changed files with 28 additions and 3 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.drbeef.questzdoom"
android:versionCode="5"
android:versionName="0.4.0" android:installLocation="auto" >
android:versionCode="6"
android:versionName="0.4.1" android:installLocation="auto" >
<!-- Tell the system this app requires OpenGL ES 3.1. -->
<uses-feature android:glEsVersion="0x00030001" android:required="true"/>

View file

@ -179,6 +179,7 @@ void OpenGLFrameBuffer::Update()
Begin2D(false);
DrawRateStuff();
DrawVersionString();
GLRenderer->Flush();
Swap();

View file

@ -857,6 +857,29 @@ void DFrameBuffer::CopyWithGammaBgra(void *output, int pitch, const uint8_t *gam
}
}
//==========================================================================
//
// DFrameBuffer :: DrawVersionString
//
// Draws the version string to the main screen
//
//==========================================================================
void DFrameBuffer::DrawVersionString ()
{
if (gamestate == GS_STARTUP ||
gamestate == GS_DEMOSCREEN) {
char buff[60];
int textScale = active_con_scale();
mysnprintf(buff, countof(buff), "%s", GetVersionString());
DrawText(ConFont, CR_WHITE, 0, 0, (char *) &buff[0],
DTA_VirtualWidth, screen->GetWidth() / textScale,
DTA_VirtualHeight, screen->GetHeight() / textScale,
DTA_KeepRatio, true, TAG_DONE);
}
}
//==========================================================================
//

View file

@ -515,6 +515,7 @@ public:
protected:
void DrawRateStuff ();
void DrawVersionString ();
void CopyFromBuff (uint8_t *src, int srcPitch, int width, int height, uint8_t *dest);
void CopyWithGammaBgra(void *output, int pitch, const uint8_t *gammared, const uint8_t *gammagreen, const uint8_t *gammablue, PalEntry flash, int flash_amount);

View file

@ -41,7 +41,7 @@ const char *GetVersionString();
/** Lots of different version numbers **/
#define VERSIONSTR "QuestZDoom Beta-0.4 - LZDoom 3.83a"
#define VERSIONSTR "QuestZDoom-0.4.1 (LZDoom 3.83a)"
// The version as seen in the Windows resource
#define RC_FILEVERSION 3,83,1