Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.25 KB | None | 0 0
  1. #pragma once
  2.  
  3. #define WIN32_LEAN_AND_MEAN             // Exclude rarely-used stuff from Windows headers
  4. // Windows Header Files
  5. #include <windows.h>
  6. #include <string>
  7. #include <tchar.h>
  8.  
  9. int (__cdecl* divaMain)(int argc, const char** argv, const char** envp) = (int(__cdecl*)(int argc, const char** argv, const char** envp))0x140194D90;
  10.  
  11. using namespace std;
  12.  
  13. string arg;
  14.  
  15. typedef basic_string<TCHAR> tstring;
  16.  
  17. tstring DirPath() {
  18.     TCHAR buffer[MAX_PATH];
  19.     GetModuleFileName(NULL, buffer, MAX_PATH);
  20.     tstring::size_type pos = tstring(buffer).find_last_of(_T("\\/"));
  21.     return tstring(buffer).substr(0, pos);
  22. }
  23.  
  24. tstring CONFIG_FILE_STRING = DirPath() + _T("\\plugins\\config.ini");
  25. tstring DIVA_EXECUTABLE_STRING = DirPath() + _T("\\diva.exe");
  26. tstring DIVA_EXECUTABLE_LAUNCH_STRING = DirPath() + _T("\\diva.exe --launch");
  27. LPCTSTR DIVA_EXECUTABLE = DIVA_EXECUTABLE_STRING.c_str();
  28. LPTSTR DIVA_EXECUTABLE_LAUNCH = const_cast<TCHAR*>(DIVA_EXECUTABLE_LAUNCH_STRING.c_str());
  29. LPCTSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
  30.  
  31. int nFullscreen = GetPrivateProfileInt(_T("resolution"), _T("fullscreen"), TRUE, CONFIG_FILE);
  32. int nBorderless = GetPrivateProfileInt(_T("resolution"), _T("borderless"), FALSE, CONFIG_FILE);
  33. int nWidth = GetPrivateProfileInt(_T("resolution"), _T("width"), 1280, CONFIG_FILE);
  34. int nHeight = GetPrivateProfileInt(_T("resolution"), _T("height"), 720, CONFIG_FILE);
  35.  
  36. int nIntRes = GetPrivateProfileInt(_T("resolution"), _T("r.enable"), FALSE, CONFIG_FILE);
  37. int nIntResWidth = GetPrivateProfileInt(_T("resolution"), _T("r.width"), 1280, CONFIG_FILE);
  38. int nIntResHeight = GetPrivateProfileInt(_T("resolution"), _T("r.height"), 720, CONFIG_FILE);
  39.  
  40. int nStereo = GetPrivateProfileInt(_T("patches"), _T("stereo"), FALSE, CONFIG_FILE);
  41. int nCursor = GetPrivateProfileInt(_T("patches"), _T("cursor"), TRUE, CONFIG_FILE);
  42. int nTAA = GetPrivateProfileInt(_T("graphics"), _T("TAA"), TRUE, CONFIG_FILE);
  43. int nMLAA = GetPrivateProfileInt(_T("graphics"), _T("MLAA"), TRUE, CONFIG_FILE);
  44.  
  45. int nFPSLimit = GetPrivateProfileInt(_T("graphics"), _T("FPS.Limit"), 0, CONFIG_FILE);
  46.  
  47. //auto nBitDepth = GetPrivateProfileIntW(L"resolution", L"bitdepth", 32, CONFIG_FILE);
  48. //auto nRefreshRate = GetPrivateProfileIntW(L"resolution", L"refreshrate", 60, CONFIG_FILE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement