commit
1e1fce1a03
|
@ -475,7 +475,7 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetPlatform(
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj)
|
JNIEXPORT jstring JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetVersionString(JNIEnv *env, jobject obj)
|
||||||
{
|
{
|
||||||
return env->NewStringUTF(scm_rev_str);
|
return env->NewStringUTF(scm_rev_str.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj)
|
JNIEXPORT jboolean JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_SupportsNEON(JNIEnv *env, jobject obj)
|
||||||
|
|
|
@ -7,13 +7,14 @@
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// Git version number
|
// Git version number
|
||||||
extern const char* scm_desc_str;
|
extern const std::string scm_desc_str;
|
||||||
extern const char* scm_branch_str;
|
extern const std::string scm_branch_str;
|
||||||
extern const char* scm_rev_str;
|
extern const std::string scm_rev_str;
|
||||||
extern const char* scm_rev_git_str;
|
extern const std::string scm_rev_git_str;
|
||||||
extern const char* netplay_dolphin_ver;
|
extern const std::string netplay_dolphin_ver;
|
||||||
|
|
||||||
// Force enable logging in the right modes. For some reason, something had changed
|
// Force enable logging in the right modes. For some reason, something had changed
|
||||||
// so that debugfast no longer logged.
|
// so that debugfast no longer logged.
|
||||||
|
|
|
@ -77,6 +77,7 @@ public:
|
||||||
std::fstream::pos_type start_pos = m_file.tellg();
|
std::fstream::pos_type start_pos = m_file.tellg();
|
||||||
std::streamoff file_size = end_pos - start_pos;
|
std::streamoff file_size = end_pos - start_pos;
|
||||||
|
|
||||||
|
m_header.Init();
|
||||||
if (m_file.is_open() && ValidateHeader())
|
if (m_file.is_open() && ValidateHeader())
|
||||||
{
|
{
|
||||||
// good header, read some key/value pairs
|
// good header, read some key/value pairs
|
||||||
|
@ -180,18 +181,17 @@ private:
|
||||||
|
|
||||||
struct Header
|
struct Header
|
||||||
{
|
{
|
||||||
Header()
|
void Init()
|
||||||
: key_t_size(sizeof(K))
|
|
||||||
, value_t_size(sizeof(V))
|
|
||||||
{
|
{
|
||||||
// Null-terminator is intentionally not copied.
|
// Null-terminator is intentionally not copied.
|
||||||
std::memcpy(&id, "DCAC", sizeof(u32));
|
std::memcpy(&id, "DCAC", sizeof(u32));
|
||||||
std::memcpy(ver, scm_rev_git_str, 40);
|
std::memcpy(ver, scm_rev_git_str.c_str(), std::min(scm_rev_git_str.size(), sizeof(ver)));
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 id;
|
u32 id;
|
||||||
const u16 key_t_size, value_t_size;
|
const u16 key_t_size = sizeof(K);
|
||||||
char ver[40];
|
const u16 value_t_size = sizeof(V);
|
||||||
|
char ver[40] = {};
|
||||||
|
|
||||||
} m_header;
|
} m_header;
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#define BUILD_TYPE_STR ""
|
#define BUILD_TYPE_STR ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char* scm_rev_str = "Dolphin "
|
const std::string scm_rev_str = "Dolphin "
|
||||||
#if !SCM_IS_MASTER
|
#if !SCM_IS_MASTER
|
||||||
"[" SCM_BRANCH_STR "] "
|
"[" SCM_BRANCH_STR "] "
|
||||||
#endif
|
#endif
|
||||||
|
@ -25,14 +25,14 @@ const char* scm_rev_str = "Dolphin "
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
const char* netplay_dolphin_ver = SCM_DESC_STR " Win";
|
const std::string netplay_dolphin_ver = SCM_DESC_STR " Win";
|
||||||
#elif __APPLE__
|
#elif __APPLE__
|
||||||
const char* netplay_dolphin_ver = SCM_DESC_STR " Mac";
|
const std::string netplay_dolphin_ver = SCM_DESC_STR " Mac";
|
||||||
#else
|
#else
|
||||||
const char* netplay_dolphin_ver = SCM_DESC_STR " Lin";
|
const std::string netplay_dolphin_ver = SCM_DESC_STR " Lin";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char* scm_rev_git_str = SCM_REV_STR;
|
const std::string scm_rev_git_str = SCM_REV_STR;
|
||||||
|
|
||||||
const char* scm_desc_str = SCM_DESC_STR;
|
const std::string scm_desc_str = SCM_DESC_STR;
|
||||||
const char* scm_branch_str = SCM_BRANCH_STR;
|
const std::string scm_branch_str = SCM_BRANCH_STR;
|
||||||
|
|
|
@ -1319,7 +1319,7 @@ void GetSettings()
|
||||||
s_memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
|
s_memcards |= (SConfig::GetInstance().m_EXIDevice[0] == EXIDEVICE_MEMORYCARD) << 0;
|
||||||
s_memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
|
s_memcards |= (SConfig::GetInstance().m_EXIDevice[1] == EXIDEVICE_MEMORYCARD) << 1;
|
||||||
unsigned int tmp;
|
unsigned int tmp;
|
||||||
for (int i = 0; i < 20; ++i)
|
for (size_t i = 0; i < scm_rev_git_str.size() / 2 ; ++i)
|
||||||
{
|
{
|
||||||
sscanf(&scm_rev_git_str[2 * i], "%02x", &tmp);
|
sscanf(&scm_rev_git_str[2 * i], "%02x", &tmp);
|
||||||
s_revision[i] = tmp;
|
s_revision[i] = tmp;
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"
|
||||||
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
#include "Core/IPC_HLE/WII_IPC_HLE_Device_usb.h"
|
||||||
|
|
||||||
static const char* NETPLAY_VERSION = scm_rev_git_str;
|
|
||||||
static std::mutex crit_netplay_client;
|
static std::mutex crit_netplay_client;
|
||||||
static NetPlayClient * netplay_client = nullptr;
|
static NetPlayClient * netplay_client = nullptr;
|
||||||
NetSettings g_NetPlaySettings;
|
NetSettings g_NetPlaySettings;
|
||||||
|
@ -162,7 +161,7 @@ bool NetPlayClient::Connect()
|
||||||
{
|
{
|
||||||
// send connect message
|
// send connect message
|
||||||
sf::Packet spac;
|
sf::Packet spac;
|
||||||
spac << NETPLAY_VERSION;
|
spac << scm_rev_git_str;
|
||||||
spac << netplay_dolphin_ver;
|
spac << netplay_dolphin_ver;
|
||||||
spac << m_player_name;
|
spac << m_player_name;
|
||||||
Send(spac);
|
Send(spac);
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char* NETPLAY_VERSION = scm_rev_git_str;
|
|
||||||
u64 g_netplay_initial_gctime = 1272737767;
|
u64 g_netplay_initial_gctime = 1272737767;
|
||||||
|
|
||||||
NetPlayServer::~NetPlayServer()
|
NetPlayServer::~NetPlayServer()
|
||||||
|
@ -241,7 +240,7 @@ unsigned int NetPlayServer::OnConnect(ENetPeer* socket)
|
||||||
std::string npver;
|
std::string npver;
|
||||||
rpac >> npver;
|
rpac >> npver;
|
||||||
// Dolphin netplay version
|
// Dolphin netplay version
|
||||||
if (npver != NETPLAY_VERSION)
|
if (npver != scm_rev_git_str)
|
||||||
return CON_ERR_VERSION_MISMATCH;
|
return CON_ERR_VERSION_MISMATCH;
|
||||||
|
|
||||||
// game is currently running
|
// game is currently running
|
||||||
|
|
|
@ -23,10 +23,10 @@ AboutDialog::AboutDialog(QWidget* parent)
|
||||||
text.append(QStringLiteral("<p style='font-size:50pt; font-weight:400; margin-bottom:0px;'>") +
|
text.append(QStringLiteral("<p style='font-size:50pt; font-weight:400; margin-bottom:0px;'>") +
|
||||||
tr("Dolphin") + QStringLiteral("</p>"));
|
tr("Dolphin") + QStringLiteral("</p>"));
|
||||||
text.append(QStringLiteral("<p style='font-size:18pt; margin-top:0px;'>%1</p>")
|
text.append(QStringLiteral("<p style='font-size:18pt; margin-top:0px;'>%1</p>")
|
||||||
.arg(QString::fromUtf8(scm_desc_str)));
|
.arg(QString::fromUtf8(scm_desc_str.c_str())));
|
||||||
|
|
||||||
text.append(small + tr("Branch: ") + QString::fromUtf8(scm_branch_str) + QStringLiteral("</p>"));
|
text.append(small + tr("Branch: ") + QString::fromUtf8(scm_branch_str.c_str()) + QStringLiteral("</p>"));
|
||||||
text.append(small + tr("Revision: ") + QString::fromUtf8(scm_rev_git_str) + QStringLiteral("</p>"));
|
text.append(small + tr("Revision: ") + QString::fromUtf8(scm_rev_git_str.c_str()) + QStringLiteral("</p>"));
|
||||||
text.append(small + tr("Compiled: ") + QStringLiteral(__DATE__ " " __TIME__ "</p>"));
|
text.append(small + tr("Compiled: ") + QStringLiteral(__DATE__ " " __TIME__ "</p>"));
|
||||||
|
|
||||||
text.append(medium + tr("Check for updates: ") +
|
text.append(medium + tr("Check for updates: ") +
|
||||||
|
|
|
@ -31,8 +31,8 @@ AboutDolphin::AboutDolphin(wxWindow *parent, wxWindowID id,
|
||||||
const wxString DolphinText = _("Dolphin");
|
const wxString DolphinText = _("Dolphin");
|
||||||
const wxString RevisionText = scm_desc_str;
|
const wxString RevisionText = scm_desc_str;
|
||||||
const wxString CopyrightText = _("(c) 2003-2015+ Dolphin Team. \"GameCube\" and \"Wii\" are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.");
|
const wxString CopyrightText = _("(c) 2003-2015+ Dolphin Team. \"GameCube\" and \"Wii\" are trademarks of Nintendo. Dolphin is not affiliated with Nintendo in any way.");
|
||||||
const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str);
|
const wxString BranchText = wxString::Format(_("Branch: %s"), scm_branch_str.c_str());
|
||||||
const wxString BranchRevText = wxString::Format(_("Revision: %s"), scm_rev_git_str);
|
const wxString BranchRevText = wxString::Format(_("Revision: %s"), scm_rev_git_str.c_str());
|
||||||
const wxString CheckUpdateText = _("Check for updates: ");
|
const wxString CheckUpdateText = _("Check for updates: ");
|
||||||
const wxString Text = _("\n"
|
const wxString Text = _("\n"
|
||||||
"Dolphin is a free and open-source GameCube and Wii emulator.\n"
|
"Dolphin is a free and open-source GameCube and Wii emulator.\n"
|
||||||
|
|
|
@ -705,7 +705,7 @@ void CFrame::UpdateTitle(const std::string &str)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str, str.c_str());
|
std::string titleStr = StringFromFormat("%s | %s", scm_rev_str.c_str(), str.c_str());
|
||||||
m_RenderFrame->SetTitle(titleStr);
|
m_RenderFrame->SetTitle(titleStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -320,14 +320,14 @@ int main(int argc, char* argv[])
|
||||||
help = 1;
|
help = 1;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
fprintf(stderr, "%s\n", scm_rev_str);
|
fprintf(stderr, "%s\n", scm_rev_str.c_str());
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (help == 1 || argc == optind)
|
if (help == 1 || argc == optind)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "%s\n\n", scm_rev_str);
|
fprintf(stderr, "%s\n\n", scm_rev_str.c_str());
|
||||||
fprintf(stderr, "A multi-platform GameCube/Wii emulator\n\n");
|
fprintf(stderr, "A multi-platform GameCube/Wii emulator\n\n");
|
||||||
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
|
fprintf(stderr, "Usage: %s [-e <file>] [-h] [-v]\n", argv[0]);
|
||||||
fprintf(stderr, " -e, --exec Load the specified file\n");
|
fprintf(stderr, " -e, --exec Load the specified file\n");
|
||||||
|
|
Loading…
Reference in New Issue