|
@@ -2,6 +2,7 @@
|
|
|
#include "Assist.h"
|
|
|
|
|
|
#include <D3D9.h>
|
|
|
+#include<direct.h>
|
|
|
//#include <D3dx9tex.h>
|
|
|
//#pragma comment(lib, "D3dx9.lib")
|
|
|
|
|
@@ -569,6 +570,7 @@ namespace GameGlobal
|
|
|
std::string g_strAppdir;
|
|
|
std::string g_strGameDir;
|
|
|
TCHAR g_szGameApp[MAX_PATH];
|
|
|
+ TCHAR g_szTempDir[MAX_PATH] = {0};
|
|
|
int nGameWndType;
|
|
|
int nAttackCount = 0;
|
|
|
|
|
@@ -584,7 +586,6 @@ namespace GameGlobal
|
|
|
_tcscat_s(g_szCurModuleDir, MAX_PATH, szDrive);
|
|
|
_tcscat_s(g_szCurModuleDir, MAX_PATH, szDir);
|
|
|
|
|
|
- g_strAppdir = g_szCurModuleDir;
|
|
|
_stprintf_s(g_szAssistConfig, _T("%s%s"), g_szCurModuleDir, _T("Assist.ini"));
|
|
|
|
|
|
TCHAR szValue[MAX_PATH] = { 0 };
|
|
@@ -592,6 +593,11 @@ namespace GameGlobal
|
|
|
g_strGameDir = szValue;
|
|
|
GetPrivateProfileString(_T("Assist"), _T("GameApp"), _T(""), g_szGameApp, MAX_PATH, g_szAssistConfig);
|
|
|
|
|
|
+ g_strAppdir = g_szCurModuleDir;
|
|
|
+ _stprintf_s(g_szTempDir, _T("%s%s\\"), g_szCurModuleDir, _T("temp"));
|
|
|
+ if (!PathFileExists(g_szTempDir))
|
|
|
+ _mkdir(g_szTempDir);
|
|
|
+
|
|
|
// ¶ÁÈ¡´°¿ÚÀàÐÍ;
|
|
|
_stprintf_s(szValue, _T("%s%s"), g_szGameApp, _T("save\\config.ini"));
|
|
|
int ScreenWidth = GetPrivateProfileInt(_T("SysCfg"), _T("ScreenWidth"), 640, szValue);
|
|
@@ -610,9 +616,9 @@ namespace GameGlobal
|
|
|
{
|
|
|
TCHAR szName[MAX_PATH] = { 0 };
|
|
|
if ( lpName == NULL || lpName[0] == '\0')
|
|
|
- _stprintf_s(szName, _T("%s%p.bmp"), GameGlobal::g_szCurModuleDir, hWnd);
|
|
|
+ _stprintf_s(szName, _T("%s%p.bmp"), GameGlobal::g_szTempDir, hWnd);
|
|
|
else
|
|
|
- _stprintf_s(szName, _T("%s%p-%s.bmp"), GameGlobal::g_szCurModuleDir, hWnd, lpName);
|
|
|
+ _stprintf_s(szName, _T("%s%p-%s.bmp"), GameGlobal::g_szTempDir, hWnd, lpName);
|
|
|
|
|
|
return std::string(szName);
|
|
|
}
|
|
@@ -623,7 +629,7 @@ namespace ImgAssist
|
|
|
std::string CaptureGameWnd(HWND hWnd)
|
|
|
{
|
|
|
TCHAR szName[MAX_PATH] = {0};
|
|
|
- _stprintf_s(szName, _T("%s%p.bmp"), GameGlobal::g_szCurModuleDir, hWnd);
|
|
|
+ _stprintf_s(szName, _T("%s%p.bmp"), GameGlobal::g_szTempDir, hWnd);
|
|
|
CaptureGameWnd(hWnd, szName);
|
|
|
|
|
|
return std::string(szName);
|