Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
- // Windows Header Files
- #include <windows.h>
- #include <string>
- #include <tchar.h>
- int (__cdecl* divaMain)(int argc, const char** argv, const char** envp) = (int(__cdecl*)(int argc, const char** argv, const char** envp))0x140194D90;
- using namespace std;
- string arg;
- typedef basic_string<TCHAR> tstring;
- tstring DirPath() {
- TCHAR buffer[MAX_PATH];
- GetModuleFileName(NULL, buffer, MAX_PATH);
- tstring::size_type pos = tstring(buffer).find_last_of(_T("\\/"));
- return tstring(buffer).substr(0, pos);
- }
- tstring CONFIG_FILE_STRING = DirPath() + _T("\\plugins\\config.ini");
- tstring DIVA_EXECUTABLE_STRING = DirPath() + _T("\\diva.exe");
- tstring DIVA_EXECUTABLE_LAUNCH_STRING = DirPath() + _T("\\diva.exe --launch");
- LPCTSTR DIVA_EXECUTABLE = DIVA_EXECUTABLE_STRING.c_str();
- LPTSTR DIVA_EXECUTABLE_LAUNCH = const_cast<TCHAR*>(DIVA_EXECUTABLE_LAUNCH_STRING.c_str());
- LPCTSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
- int nFullscreen = GetPrivateProfileInt(_T("resolution"), _T("fullscreen"), TRUE, CONFIG_FILE);
- int nBorderless = GetPrivateProfileInt(_T("resolution"), _T("borderless"), FALSE, CONFIG_FILE);
- int nWidth = GetPrivateProfileInt(_T("resolution"), _T("width"), 1280, CONFIG_FILE);
- int nHeight = GetPrivateProfileInt(_T("resolution"), _T("height"), 720, CONFIG_FILE);
- int nIntRes = GetPrivateProfileInt(_T("resolution"), _T("r.enable"), FALSE, CONFIG_FILE);
- int nIntResWidth = GetPrivateProfileInt(_T("resolution"), _T("r.width"), 1280, CONFIG_FILE);
- int nIntResHeight = GetPrivateProfileInt(_T("resolution"), _T("r.height"), 720, CONFIG_FILE);
- int nStereo = GetPrivateProfileInt(_T("patches"), _T("stereo"), FALSE, CONFIG_FILE);
- int nCursor = GetPrivateProfileInt(_T("patches"), _T("cursor"), TRUE, CONFIG_FILE);
- int nTAA = GetPrivateProfileInt(_T("graphics"), _T("TAA"), TRUE, CONFIG_FILE);
- int nMLAA = GetPrivateProfileInt(_T("graphics"), _T("MLAA"), TRUE, CONFIG_FILE);
- int nFPSLimit = GetPrivateProfileInt(_T("graphics"), _T("FPS.Limit"), 0, CONFIG_FILE);
- //auto nBitDepth = GetPrivateProfileIntW(L"resolution", L"bitdepth", 32, CONFIG_FILE);
- //auto nRefreshRate = GetPrivateProfileIntW(L"resolution", L"refreshrate", 60, CONFIG_FILE);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement