Permalink
Browse files

local merge

  • Loading branch information...
Turupawn committed Feb 6, 2019
2 parents 4821a0c + 526c1d5 commit d98dcf8b18d160325f931ea9ca0bbb170e058aaa
Showing with 15 additions and 5 deletions.
  1. +1 −1 include/dependencies/nlohmann/json.hpp
  2. +1 −1 src/Utility.cpp
  3. +13 −3 src/modio.cpp
@@ -14492,7 +14492,7 @@ struct hash<nlohmann::json>

/// specialization for std::less<value_t>
template<>
struct less<::nlohmann::detail::value_t>
struct less< ::nlohmann::detail::value_t >
{
/*!
@brief compare two value_t enum values
@@ -102,7 +102,7 @@ double getCurrentTimeMillis()
{
std::chrono::milliseconds current_time =
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch());
return current_time.count();
return (double)current_time.count();
}

// Json methods
@@ -53,22 +53,32 @@ void loadAuthenticationFile()

void modioInit(u32 environment, u32 game_id, char *api_key, char *root_path)
{
if (root_path)
modio::ROOT_PATH = root_path;

modio::createDirectory(modio::getModIODirectory());
modio::createDirectory(modio::getModIODirectory() + "mods/");
modio::createDirectory(modio::getModIODirectory() + "cache/");
modio::createDirectory(modio::getModIODirectory() + "tmp/");

modio::clearLog();

modio::writeLogLine("Initializing SDK", MODIO_DEBUGLEVEL_LOG);
if (root_path)
{
modio::writeLogLine(".modio/ directory created at " + std::string(root_path), MODIO_DEBUGLEVEL_LOG);
}else
{
modio::writeLogLine(".modio/ directory created at current workspace.", MODIO_DEBUGLEVEL_LOG);
}

modio::writeLogLine("v0.10.1", MODIO_DEBUGLEVEL_LOG);

if (environment == MODIO_ENVIRONMENT_TEST)
modio::MODIO_URL = "https://api.test.mod.io/";
modio::GAME_ID = game_id;
modio::API_KEY = api_key;
if (root_path)
modio::ROOT_PATH = root_path;


modio::installDownloadedMods();

loadEventPollingFile();

0 comments on commit d98dcf8

Please sign in to comment.