mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Start the update thread only if cURL is available
This commit is contained in:
parent
a6196851fc
commit
73aab3ddb2
@ -507,10 +507,10 @@ progressCallback (
|
|||||||
}
|
}
|
||||||
#endif /* USE_CURL */
|
#endif /* USE_CURL */
|
||||||
|
|
||||||
|
#ifdef USE_CURL
|
||||||
static void
|
static void
|
||||||
CheckForUpdates ()
|
CheckForUpdates ()
|
||||||
{
|
{
|
||||||
#ifdef USE_CURL
|
|
||||||
url_data chunk;
|
url_data chunk;
|
||||||
|
|
||||||
chunk.buffer = nullptr; /* we expect realloc(NULL, size) to work */
|
chunk.buffer = nullptr; /* we expect realloc(NULL, size) to work */
|
||||||
@ -554,8 +554,8 @@ CheckForUpdates ()
|
|||||||
free (chunk.buffer);
|
free (chunk.buffer);
|
||||||
|
|
||||||
curl_easy_cleanup (curl);
|
curl_easy_cleanup (curl);
|
||||||
#endif /* USE_CURL */
|
|
||||||
}
|
}
|
||||||
|
#endif /* USE_CURL */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
parseArgs (int argc, char * argv[], bool & exit)
|
parseArgs (int argc, char * argv[], bool & exit)
|
||||||
@ -1029,7 +1029,10 @@ DoInit (int argc, char * argv[], bool & exit)
|
|||||||
g_pPixmap->LoadCursors ();
|
g_pPixmap->LoadCursors ();
|
||||||
g_pPixmap->ChangeSprite (SPRITE_WAIT);
|
g_pPixmap->ChangeSprite (SPRITE_WAIT);
|
||||||
|
|
||||||
// g_updateThread = new std::thread (CheckForUpdates);
|
#ifdef USE_CURL
|
||||||
|
g_updateThread = new std::thread (CheckForUpdates);
|
||||||
|
#endif /* USE_CURL */
|
||||||
|
|
||||||
if (zoom != g_zoom)
|
if (zoom != g_zoom)
|
||||||
g_pEvent->SetWindowSize (g_zoom);
|
g_pEvent->SetWindowSize (g_zoom);
|
||||||
g_pEvent->SetFullScreen (g_bFullScreen);
|
g_pEvent->SetFullScreen (g_bFullScreen);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user