Browse Source

Show git revision on titlebar

Yihua LOU 7 years ago
parent
commit
ecab50421b
2 changed files with 9 additions and 16 deletions
  1. 0 4
      .gitignore
  2. 9 12
      main.c

+ 0 - 4
.gitignore

@@ -229,10 +229,6 @@ GeneratedArtifacts/
 _Pvt_Extensions/
 ModelManifest.xml
 
-# SDL2 associated file
-SDL2/
-!SDL2/README.md
-
 # ant immediate
 android/gen
 android/libs

+ 9 - 12
main.c

@@ -104,22 +104,19 @@ PAL_Init(
    PAL_InitResources();
    AUDIO_OpenDevice();
 
-   if (gConfig.fIsWIN95)
-   {
-#ifdef _DEBUG
-      VIDEO_SetWindowTitle("Pal WIN95 (Debug Build)");
+   VIDEO_SetWindowTitle(va("Pal %s%s%s",
+	   gConfig.fIsWIN95 ? "Win95" : "DOS",
+#if defined(_DEBUG) || defined(DEBUG)
+	   " (Debug) ",
 #else
-      VIDEO_SetWindowTitle("Pal WIN95");
+	   "",
 #endif
-   }
-   else
-   {
-#ifdef _DEBUG
-      VIDEO_SetWindowTitle("Pal (Debug Build)");
+#if defined(PAL_GIT_REVISION)
+	   " ["  PAL_GIT_REVISION "] "
 #else
-      VIDEO_SetWindowTitle("Pal");
+	   ""
 #endif
-   }
+   ));
 }
 
 VOID