diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 9755c996bd..9a55882a66 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -21,11 +21,8 @@ #include "Common.h" #include -// Increment this every time you change shader generation code. -enum -{ - LINEAR_DISKCACHE_VER = 6979 -}; +// defined in Version.cpp +extern const char *scm_rev_git_str; // On disk format: //header{ @@ -187,13 +184,15 @@ private: { Header() : id(*(u32*)"DCAC") - , ver(LINEAR_DISKCACHE_VER) , key_t_size(sizeof(K)) , value_t_size(sizeof(V)) - {} + { + memcpy(ver, scm_rev_git_str, 40); + } - const u32 id, ver; + const u32 id; const u16 key_t_size, value_t_size; + char ver[40]; } m_header; diff --git a/Source/Core/Common/Src/Version.cpp b/Source/Core/Common/Src/Version.cpp index 97e232785d..a668d24e1b 100644 --- a/Source/Core/Common/Src/Version.cpp +++ b/Source/Core/Common/Src/Version.cpp @@ -50,3 +50,5 @@ const char *netplay_dolphin_ver = SCM_DESC_STR " M" NP_ARCH; #else const char *netplay_dolphin_ver = SCM_DESC_STR " L" NP_ARCH; #endif + +const char *scm_rev_git_str = SCM_REV_STR;