Skip to content

Commit

Permalink
Use version constant instead
Browse files Browse the repository at this point in the history
  • Loading branch information
xtreme8000 committed Jan 29, 2018
1 parent bec6601 commit bd8982a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion resources/VERSION

This file was deleted.

2 changes: 2 additions & 0 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
along with BetterSpades. If not, see <http://www.gnu.org/licenses/>.
*/

#define BETTERSPADES_VERSION "v0.1.2"

#if __APPLE__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
Expand Down
6 changes: 2 additions & 4 deletions src/hud.c
Original file line number Diff line number Diff line change
Expand Up @@ -1379,11 +1379,9 @@ static void hud_serverlist_render(float scalex, float scaley) {
switch(http_process(request_version)) {
case HTTP_STATUS_COMPLETED:
serverlist_is_outdated = 1;
char* v = file_load("VERSION");
printf("newest game version: %s\n",request_version->response_data);
printf("current game version: %s\n",v);
serverlist_is_outdated = strcmp(request_version->response_data,v)!=0;
free(v);
printf("current game version: %s\n",BETTERSPADES_VERSION);
serverlist_is_outdated = strcmp(request_version->response_data,BETTERSPADES_VERSION)!=0;
http_release(request_version);
request_version = NULL;
break;
Expand Down
2 changes: 1 addition & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int main(int argc, char** argv) {
glfwWindowHint(GLFW_SAMPLES,settings.multisamples);
}

GLFWwindow* window = glfwCreateWindow(settings.window_width,settings.window_height,"BetterSpades",settings.fullscreen?glfwGetPrimaryMonitor():NULL,NULL);
GLFWwindow* window = glfwCreateWindow(settings.window_width,settings.window_height,"BetterSpades "BETTERSPADES_VERSION,settings.fullscreen?glfwGetPrimaryMonitor():NULL,NULL);
if(!window) {
printf("Could not open window\n");
glfwTerminate();
Expand Down

0 comments on commit bd8982a

Please sign in to comment.