diff --git a/Actions.def b/Actions.def index a62266a..0075a82 100644 --- a/Actions.def +++ b/Actions.def @@ -23,6 +23,8 @@ ACTION(setBicubicScaling, RSManager::get().getScaler()->setScaling(Scaler::BICUB ACTION(showStatus, RSManager::get().getScaler()->showStatus()) +ACTION(dumpFrame, RSManager::get().dumpFrame()) + ACTION(reloadAAEffect, RSManager::get().reloadAA()) ACTION(userTrigger, SDLOG(0, "================================================================= USER TRIGGER ===\n")) diff --git a/Console.cpp b/Console.cpp index 9ea2184..7dab5ec 100644 --- a/Console.cpp +++ b/Console.cpp @@ -111,10 +111,7 @@ void Console::draw() { else lineHeight = y + 15.0f; } -void Console::print(float x, float y, const char *text) { - // assume orthographic projection with units = screen pixels, origin at top left - //float wF = 1.0f/Console::get().getW(), hF = 1.0f/Console::get().getH(); - +void Console::print(float x, float y, const char *text) { unsigned passes; effect->SetTexture(textTex2DHandle, fontTex); effect->Begin(&passes, 0); diff --git a/Detouring.cpp b/Detouring.cpp index 1ae7cfc..70a9a69 100644 --- a/Detouring.cpp +++ b/Detouring.cpp @@ -4,13 +4,14 @@ #include #include #include +#include #define DIRECTINPUT_VERSION 0x0800 #include #include -#include +#include "string_utils.h" #include "Settings.h" #include "RenderstateManager.h" @@ -347,10 +348,31 @@ GENERATE_INTERCEPT_HEADER(SetWindowPos, BOOL, WINAPI, _In_ HWND hWnd, _In_opt_ H ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Actual detouring ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +HMODULE findDll(const string& name) { + if(name.find("*") != name.npos) { + SDLOG(16, "Dll pattern search...\n"); + HMODULE modules[1024]; + DWORD needed; + if(EnumProcessModules(GetCurrentProcess(), modules, 1024*sizeof(HMODULE), &needed)) { + for(unsigned i=0; i < (needed / sizeof(HMODULE)); i++) { + TCHAR modname[MAX_PATH]; + if(GetModuleFileNameEx(GetCurrentProcess(), modules[i], modname, sizeof(modname)/sizeof(TCHAR))) { + SDLOG(16, " - checking against module %s\n", modname); + if(matchWildcard(modname, name)) { + SDLOG(1, "Found dll matching pattern %s in %s\n", name.c_str(), modname); + return modules[i]; + } + } + } + } + } + return GetModuleHandle(name.c_str()); +} + void hookFunction(const char* name, const char* dllname, void **ppTarget, void* const pDetour, void** ppOriginal, bool& flag) { if(!flag) { - SDLOG(1, "Trying to hook %s in %s\n", name, dllname); - HMODULE dllhandle = GetModuleHandle(dllname); + SDLOG(6, "Trying to hook %s in %s\n", name, dllname); + HMODULE dllhandle = findDll(dllname); if(dllhandle) { *ppTarget = GetProcAddress(dllhandle, name); MH_STATUS ret = MH_CreateHook(*ppTarget, pDetour, ppOriginal); \ @@ -362,7 +384,7 @@ void hookFunction(const char* name, const char* dllname, void **ppTarget, void* flag = true; } \ else { SDLOG(0, " -> ERROR enabling hook for %s\n", name); } \ - } else SDLOG(1, " -> DLL not loaded!\n") + } else SDLOG(6, " -> DLL not found!\n") } } diff --git a/GeDoSaTo.v11.suo b/GeDoSaTo.v11.suo index 876ead1..3d42efc 100644 Binary files a/GeDoSaTo.v11.suo and b/GeDoSaTo.v11.suo differ diff --git a/GeDoSaTo.vcxproj b/GeDoSaTo.vcxproj index 08d5477..ef2cf29 100644 --- a/GeDoSaTo.vcxproj +++ b/GeDoSaTo.vcxproj @@ -84,11 +84,11 @@ d3d9 - C:\dev\minhook\lib;C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Lib\x86;$(LibraryPath) + C:\dev\boost\stage\lib;C:\dev\minhook\lib;C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Lib\x86;$(LibraryPath) C:\dev\minhook\include;$(IncludePath) - C:\dev\minhook\lib;C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Lib\x86;$(LibraryPath) + C:\dev\boost\stage\lib;C:\dev\minhook\lib;C:\Program Files (x86)\Microsoft DirectX SDK (August 2009)\Lib\x86;$(LibraryPath) @@ -320,6 +320,7 @@ + @@ -342,6 +343,7 @@ + diff --git a/Hooks.def b/Hooks.def index ca32b22..1615117 100644 --- a/Hooks.def +++ b/Hooks.def @@ -7,6 +7,9 @@ HOOK(LoadLibraryExW, "Kernel32.dll") HOOK(Direct3DCreate9, "D3d9.dll") HOOK(Direct3DCreate9Ex, "D3d9.dll") +HOOK(D3DXCreateTextureFromFileInMemory, "d3dx9_*.dll") +HOOK(D3DXCreateTextureFromFileInMemoryEx, "d3dx9_*.dll") + HOOK(EnumDisplaySettingsExA, "User32.dll") HOOK(EnumDisplaySettingsExW, "User32.dll") diff --git a/RenderstateManager.cpp b/RenderstateManager.cpp index a47b4d5..c10ac60 100644 --- a/RenderstateManager.cpp +++ b/RenderstateManager.cpp @@ -6,6 +6,8 @@ #include #include +#include + #include "d3dutil.h" #include "d3d9dev_ex.h" #include "Settings.h" @@ -258,9 +260,14 @@ void RSManager::registerD3DXCreateTextureFromFileInMemory(LPCVOID pSrcData, UINT IDirect3DSurface9* surf; ((IDirect3DTexture9*)pTexture)->GetSurfaceLevel(0, &surf); string directory = getInstalledFileName(format("textures\\%s\\dump\\", getExeFileName().c_str())); - CreateDirectory(directory.c_str(), NULL); - D3DXSaveSurfaceToFile(format("%s%08x.tga", directory.c_str(), hash).c_str(), D3DXIFF_TGA, surf, NULL, NULL); - surf->Release(); + SDLOG(0, "%s\n", boost::filesystem::path(directory).string().c_str()) + try { + boost::filesystem::create_directories(boost::filesystem::path(directory)); + D3DXSaveSurfaceToFile(format("%s%08x.tga", directory.c_str(), hash).c_str(), D3DXIFF_TGA, surf, NULL, NULL); + } catch(boost::filesystem::filesystem_error e) { + SDLOG(0, "ERROR - Filesystem error while trying to create directory:\n%s\n", e.what()); + } + SAFERELEASE(surf); } registerKnowTexture(pSrcData, SrcDataSize, pTexture); } @@ -344,23 +351,22 @@ const char* RSManager::getTextureName(IDirect3DBaseTexture9* pTexture) { } HRESULT RSManager::redirectD3DXCreateTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 pDevice, LPCVOID pSrcData, UINT SrcDataSize, UINT Width, UINT Height, UINT MipLevels, DWORD Usage, D3DFORMAT Format, D3DPOOL Pool, DWORD Filter, DWORD MipFilter, D3DCOLOR ColorKey, D3DXIMAGE_INFO* pSrcInfo, PALETTEENTRY* pPalette, LPDIRECT3DTEXTURE9* ppTexture) { - //if(Settings::get().getEnableTextureOverride()) { - // UINT ssize = (SrcDataSize == 2147483647u) ? (Width*Height/2) : SrcDataSize; - // UINT32 hash = SuperFastHash((char*)const_cast(pSrcData), ssize); - // SDLOG(4, "Trying texture override size: %8u, hash: %8x\n", ssize, hash); - // - // char buffer[128]; - // sprintf_s(buffer, "dpfix/tex_override/%08x.dds", hash); - // if(fileExists(buffer)) { - // SDLOG(3, "Texture override (dds)! hash: %8x\n", hash); - // return D3DXCreateTextureFromFileEx(pDevice, buffer, D3DX_DEFAULT, D3DX_DEFAULT, MipLevels, Usage, Format, Pool, Filter, MipFilter, ColorKey, pSrcInfo, pPalette, ppTexture); - // } - // sprintf_s(buffer, "dpfix/tex_override/%08x.png", hash); - // if(fileExists(buffer)) { - // SDLOG(3, "Texture override (png)! hash: %8x\n", hash); - // return D3DXCreateTextureFromFileEx(pDevice, buffer, D3DX_DEFAULT, D3DX_DEFAULT, MipLevels, Usage, Format, Pool, Filter, MipFilter, ColorKey, pSrcInfo, pPalette, ppTexture); - // } - //} + if(Settings::get().getEnableTextureOverride()) { + UINT ssize = (SrcDataSize == 2147483647u) ? (Width*Height/2) : SrcDataSize; + UINT32 hash = SuperFastHash((char*)const_cast(pSrcData), ssize); + SDLOG(4, "Trying texture override size: %8u, hash: %8x\n", ssize, hash); + + string fn = getInstalledFileName(format("textures\\%s\\override\\%08x.dds", getExeFileName().c_str(), hash)); + if(fileExists(fn.c_str())) { + SDLOG(3, "Texture override (dds)! hash: %8x\n", hash); + return D3DXCreateTextureFromFileEx(pDevice, fn.c_str(), D3DX_DEFAULT, D3DX_DEFAULT, MipLevels, Usage, Format, Pool, Filter, MipFilter, ColorKey, pSrcInfo, pPalette, ppTexture); + } + fn = getInstalledFileName(format("textures\\%s\\override\\%08x.png", getExeFileName().c_str(), hash)); + if(fileExists(fn.c_str())) { + SDLOG(3, "Texture override (png)! hash: %8x\n", hash); + return D3DXCreateTextureFromFileEx(pDevice, fn.c_str(), D3DX_DEFAULT, D3DX_DEFAULT, MipLevels, Usage, Format, Pool, Filter, MipFilter, ColorKey, pSrcInfo, pPalette, ppTexture); + } + } return TrueD3DXCreateTextureFromFileInMemoryEx(pDevice, pSrcData, SrcDataSize, Width, Height, MipLevels, Usage, Format, Pool, Filter, MipFilter, ColorKey, pSrcInfo, pPalette, ppTexture); } diff --git a/Settings.def b/Settings.def index 8a734ea..5f07bb0 100644 --- a/Settings.def +++ b/Settings.def @@ -15,15 +15,18 @@ SETTING(unsigned, OverrideHeight, "overrideHeight", 720); SETTING(std::string, ScalingType, "scalingType", "linear"); +SETTING(bool, EmulateFlipBehaviour, "emulateFlipBehaviour", true); + +// Texture options +SETTING(bool, EnableTextureDumping, "enableTextureDumping", false); +SETTING(bool, EnableTextureOverride, "enableTextureOverride", false); + // Mouse options SETTING(bool, ModifyGetCursorPos, "modifyGetCursorPos", true); SETTING(bool, AdjustMessagePt, "adjustMessagePt", true); // Logging Options SETTING(int, LogLevel, "logLevel", 0); - -// Wrapper chaining options -SETTING(std::string, Dinput8dllWrapper, "dinput8dllWrapper", ""); // Folder options SETTING(std::string, ScreenshotDir, "screenshotDir", "."); diff --git a/blacklist.cpp b/blacklist.cpp index 04c8fb1..4c296ff 100644 --- a/blacklist.cpp +++ b/blacklist.cpp @@ -1,11 +1,11 @@ #include "blacklist.h" #include "main.h" +#include "string_utils.h" #include using namespace std; -#include bool onBlacklist(std::string fn) { std::ifstream infile(getAssetFileName("blacklist.txt")); @@ -13,7 +13,7 @@ bool onBlacklist(std::string fn) { boost::algorithm::trim(fn); while(std::getline(infile, line)) { boost::algorithm::trim(line); - if(boost::iequals(fn, line)) return true; + if(matchWildcard(fn, line)) return true; } return false; } diff --git a/d3d9dev.cpp b/d3d9dev.cpp index a376e5b..ccb0ba3 100644 --- a/d3d9dev.cpp +++ b/d3d9dev.cpp @@ -124,11 +124,13 @@ HRESULT APIENTRY hkIDirect3DDevice9::BeginStateBlock() { HRESULT APIENTRY hkIDirect3DDevice9::Clear(DWORD Count, CONST D3DRECT *pRects, DWORD Flags, D3DCOLOR Color, float Z, DWORD Stencil) { RSManager::setLatest(rsMan); + SDLOG(4, "Clear"); return m_pD3Ddev->Clear(Count, pRects, Flags, Color, Z, Stencil); } HRESULT APIENTRY hkIDirect3DDevice9::ColorFill(IDirect3DSurface9* pSurface,CONST RECT* pRect, D3DCOLOR color) { RSManager::setLatest(rsMan); + SDLOG(6, "ColorFill"); return m_pD3Ddev->ColorFill(pSurface,pRect,color); } @@ -525,6 +527,7 @@ HRESULT APIENTRY hkIDirect3DDevice9::SetFVF(DWORD FVF) { void APIENTRY hkIDirect3DDevice9::SetGammaRamp(UINT iSwapChain,DWORD Flags,CONST D3DGAMMARAMP* pRamp) { RSManager::setLatest(rsMan); + SDLOG(3, "SetGammaRamp\n"); m_pD3Ddev->SetGammaRamp(iSwapChain,Flags, pRamp); } @@ -616,13 +619,13 @@ HRESULT APIENTRY hkIDirect3DDevice9::SetSoftwareVertexProcessing(BOOL bSoftware) HRESULT APIENTRY hkIDirect3DDevice9::SetStreamSource(UINT StreamNumber,IDirect3DVertexBuffer9* pStreamData,UINT OffsetInBytes,UINT Stride) { RSManager::setLatest(rsMan); - SDLOG(4, "SetStreamSource %d: %p (%u, %u)\n", StreamNumber, pStreamData, OffsetInBytes, Stride); + SDLOG(8, "SetStreamSource %d: %p (%u, %u)\n", StreamNumber, pStreamData, OffsetInBytes, Stride); return m_pD3Ddev->SetStreamSource(StreamNumber, pStreamData,OffsetInBytes, Stride); } HRESULT APIENTRY hkIDirect3DDevice9::SetStreamSourceFreq(UINT StreamNumber,UINT Divider) { RSManager::setLatest(rsMan); - SDLOG(4, "SetStreamSourceFreq %d: %u\n", StreamNumber, Divider); + SDLOG(8, "SetStreamSourceFreq %d: %u\n", StreamNumber, Divider); return m_pD3Ddev->SetStreamSourceFreq(StreamNumber, Divider); } diff --git a/d3dutil.cpp b/d3dutil.cpp index 55397c9..c5df501 100644 --- a/d3dutil.cpp +++ b/d3dutil.cpp @@ -190,6 +190,17 @@ TCHAR* D3DMultisampleTypeToString(D3DMULTISAMPLE_TYPE type) { return "Unknown D3D multisample type"; } +TCHAR* D3DSwapEffectToString(D3DSWAPEFFECT swap) { + switch(swap) { + case D3DSWAPEFFECT_DISCARD: return "D3DSWAPEFFECT_DISCARD"; + case D3DSWAPEFFECT_FLIP: return "D3DSWAPEFFECT_FLIP"; + case D3DSWAPEFFECT_COPY: return "D3DSWAPEFFECT_COPY"; + case D3DSWAPEFFECT_OVERLAY: return "D3DSWAPEFFECT_OVERLAY"; + case D3DSWAPEFFECT_FLIPEX: return "D3DSWAPEFFECT_FLIPEX"; + } + return "Unknown swap effect"; +} + string D3DMatrixToString(const D3DMATRIX* pMatrix) { std::stringstream ss; if(!pMatrix) return string("NULL_MATRIX"); @@ -202,3 +213,16 @@ string D3DMatrixToString(const D3DMATRIX* pMatrix) { } return ss.str(); } + +string D3DPresentExFlagsToString(DWORD flags) { + string ret; + if(flags & D3DPRESENT_DONOTFLIP) ret += "D3DPRESENT_DONOTFLIP | "; + if(flags & D3DPRESENT_DONOTWAIT) ret += "D3DPRESENT_DONOTWAIT | "; + if(flags & D3DPRESENT_FORCEIMMEDIATE) ret += "D3DPRESENT_FORCEIMMEDIATE | "; + if(flags & D3DPRESENT_LINEAR_CONTENT) ret += "D3DPRESENT_LINEAR_CONTENT | "; + if(flags & D3DPRESENT_VIDEO_RESTRICT_TO_MONITOR) ret += "D3DPRESENT_VIDEO_RESTRICT_TO_MONITOR | "; + if(flags & D3DPRESENT_UPDATEOVERLAYONLY) ret += "D3DPRESENT_UPDATEOVERLAYONLY | "; + if(flags & D3DPRESENT_HIDEOVERLAY) ret += "D3DPRESENT_HIDEOVERLAY | "; + if(flags & D3DPRESENT_UPDATECOLORKEY) ret += "D3DPRESENT_UPDATECOLORKEY | "; + return ret; +} diff --git a/d3dutil.h b/d3dutil.h index c66e9e8..5388534 100644 --- a/d3dutil.h +++ b/d3dutil.h @@ -11,5 +11,7 @@ TCHAR* D3DDeclUsageToString(D3DDECLUSAGE type); TCHAR* D3DDevTypeToString(D3DDEVTYPE type); TCHAR* D3DResourceTypeToString(D3DRESOURCETYPE type); TCHAR* D3DMultisampleTypeToString(D3DMULTISAMPLE_TYPE type); +TCHAR* D3DSwapEffectToString(D3DSWAPEFFECT swap); string D3DMatrixToString(const D3DMATRIX* pMatrix); +string D3DPresentExFlagsToString(DWORD flags); diff --git a/main.cpp b/main.cpp index 0e50015..89de91f 100644 --- a/main.cpp +++ b/main.cpp @@ -27,7 +27,7 @@ FILE* g_oFile = NULL; bool g_active = false; LRESULT CALLBACK GeDoSaToHook(_In_ int nCode, _In_ WPARAM wParam, _In_ LPARAM lParam) { - SDLOG(16, "GeDoSaToHook called\n"); + SDLOG(18, "GeDoSaToHook called\n"); return CallNextHookEx(NULL, nCode, wParam, lParam); } @@ -39,24 +39,30 @@ const char* GeDoSaToVersion() { BOOL WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved) { if(dwReason == DLL_PROCESS_ATTACH) { + OutputDebugString("GeDoSaTo: startup"); + + // read install location from registry + getInstallDirectory(); + OutputDebugString("GeDoSaTo: Got install dir"); + // don't attach to processes on the blacklist if(onBlacklist(getExeFileName())) { + OutputDebugString("GeDoSaTo: Blacklisted"); if(getExeFileName() == "GeDoSaToTool") return true; return false; } g_active = true; - - // read install location from registry - getInstallDirectory(); + OutputDebugString("GeDoSaTo: Active"); - // initialize log + // initialize log string logFn = format("logs\\%s_%s.log", getExeFileName().c_str(), getTimeString().c_str()); - boost::replace_all(logFn, ":", "-"); - boost::replace_all(logFn, " ", "_"); + std::replace(logFn.begin(), logFn.end(), ':', '-'); + std::replace(logFn.begin(), logFn.end(), ' ', '_'); logFn = getInstalledFileName(logFn); fopen_s(&g_oFile, logFn.c_str(), "w"); if(!g_oFile) OutputDebugString(format("GeDoSaTo: Error opening log fn %s", logFn.c_str()).c_str()); else OutputDebugString(format("GeDoSaTo: Opening log fn %s, handle: %p", logFn.c_str(), g_oFile).c_str()); + OutputDebugString("GeDoSaTo: Log file initialized, let that take over"); // startup sdlogtime(-1); @@ -96,9 +102,9 @@ const std::string& getInstallDirectory() { const string& getExeFileName() { static string exeFn; if(exeFn.empty()) { - char fileName[2048]; - GetModuleFileNameA(NULL, fileName, 2048); - exeFn = string(fileName); + char fileName[MAX_PATH]; + GetModuleFileNameA(NULL, fileName, MAX_PATH); + exeFn = fileName; size_t pos = exeFn.rfind("\\"); if(pos != string::npos) { exeFn = exeFn.substr(pos+1); @@ -179,10 +185,10 @@ void messageErrorAndExit(string error) { #include string format(const char* formatString, ...) { - va_list arglist; - va_start(arglist, formatString); const unsigned BUFFER_SIZE = 2048*8; char buffer[BUFFER_SIZE]; + va_list arglist; + va_start(arglist, formatString); vsnprintf_s(buffer, BUFFER_SIZE, formatString, arglist); va_end(arglist); return string(buffer); diff --git a/pack/GeDoSaTo.ini b/pack/GeDoSaTo.ini index f9aa451..658024e 100644 --- a/pack/GeDoSaTo.ini +++ b/pack/GeDoSaTo.ini @@ -1,15 +1,15 @@ # The amount of logging output for debugging purpose. # Should be set to 0 if everything works fine for performance reasons. -logLevel 50 +logLevel 20 ######################################################################################## # Graphics settings # The actual rendering resolution you want to use, # and how many Hz you want the game to think it works at. -renderWidth 4000 -renderHeight 2250 +renderWidth 3008 +renderHeight 1692 reportedHz 60 # The resolution you want to downsample *to*. @@ -31,6 +31,16 @@ overrideHeight 0 # bicubic: higher quality, more expensive performance-wise scalingType bicubic +######################################################################################## +# Texture settings + +# Dump game textures loaded using d3dx to textures\[gamename]\dump\[hash].tga +enableTextureDumping false + +# Override game textures loaded using d3dx with those from +# textures\[gamename]\override\[hash].(dds|png), if available +enableTextureOverride false + ######################################################################################## # Mouse settings diff --git a/pack/GeDoSaToKeys.ini b/pack/GeDoSaToKeys.ini index 22025ad..2169532 100644 --- a/pack/GeDoSaToKeys.ini +++ b/pack/GeDoSaToKeys.ini @@ -4,4 +4,6 @@ takeScreenshot VK_F6 setBilinearScaling VK_F7 setBicubicScaling VK_F8 -showStatus VK_F9 \ No newline at end of file +showStatus VK_F9 + +dumpFrame VK_F10 \ No newline at end of file diff --git a/pack/README.txt b/pack/README.txt index f49a534..fe02ddb 100644 --- a/pack/README.txt +++ b/pack/README.txt @@ -13,7 +13,7 @@ How do I use it? (INSTALLATION INSTRUCTIONS) =========================================== 1) Extract the contents of the zip to some permanent directory 2) Adjust the settings in GeDoSaTo.ini and GeDoSaToKeys.ini as desired -3) Run GeDoSaToTool.exe (*as Administrator*) +3) Run GeDoSaToTool.exe *as Administrator* What are the advantages and disadvantages compared to driver-level downsampling? ================================================================================ @@ -25,9 +25,16 @@ Advantages: - Support downsampling to high-frequency (e.g. 120 Hz or 144 Hz) target modes - Not limited by display hardware Disadvantages: -- Compatibility is limited compared to driver-level downsampling (only DirectX9 supported currently) +- Compatibility is limited compared to driver-level downsampling + (only DirectX9 and DirectX9Ex supported currently) - Bugs :P +What additional features are there? +=================================== +- take screenshots of either the pre-downsampled full buffer or the actual image displayed on screen + (automatically sorted in per-game folders!) +- generic texture overriding for all textures loaded using D3DX + Will it work? ============= It's a very early release, so you tell me. @@ -36,7 +43,7 @@ or not have any adverse effect on your game/computer. Use at your own risk!* Are there known issues? ======================= -The mouse cursor position and/or click detection is broken in some games. Still working on that. +The mouse cursor position and/or click detection is broken in some games. Will it cause performance problems? =================================== diff --git a/pack/VERSIONS.txt b/pack/VERSIONS.txt index d760153..450f611 100644 --- a/pack/VERSIONS.txt +++ b/pack/VERSIONS.txt @@ -1,5 +1,5 @@ -??-??-2013 -- version 0.1 alpha +??-??-2014 -- version 0.1 alpha =============================== - Initial release - This will probably break everything horribly, use at your own risk diff --git a/pack/assets/blacklist.txt b/pack/assets/blacklist.txt index 194a2f8..a3e3eb1 100644 --- a/pack/assets/blacklist.txt +++ b/pack/assets/blacklist.txt @@ -27,7 +27,7 @@ Uplay WerFault AvastUI DllHost -FlashPlayerPlugin_11_9_900_170 +FlashPlayerPlugin_* FSViewer HsMgr NvBackend @@ -36,3 +36,9 @@ regsvr32 runonce plugin-container Dbgview +javaw +jucheck +reader_sl +KiesTrayAgent +foobar2000 +thunderbird diff --git a/pack/textures/.gitignore b/pack/textures/.gitignore new file mode 100644 index 0000000..05ba7f0 --- /dev/null +++ b/pack/textures/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!textures_stored_here \ No newline at end of file diff --git a/pack/textures/textures_stored_here b/pack/textures/textures_stored_here new file mode 100644 index 0000000..e69de29 diff --git a/reference/.gitignore b/reference/.gitignore new file mode 100644 index 0000000..2761c6c --- /dev/null +++ b/reference/.gitignore @@ -0,0 +1 @@ +fd \ No newline at end of file diff --git a/string_utils.cpp b/string_utils.cpp new file mode 100644 index 0000000..9728e9e --- /dev/null +++ b/string_utils.cpp @@ -0,0 +1,10 @@ +#include "string_utils.h" + +bool matchWildcard(const string& str, const string& pattern) { + string regex = pattern; + boost::replace_all(regex, ".", "\\."); + boost::replace_all(regex, "*", ".*"); + regex = string(".*") + regex; + std::regex rx(regex, std::regex::icase); + return std::regex_match(str, rx); +} diff --git a/string_utils.h b/string_utils.h new file mode 100644 index 0000000..2404223 --- /dev/null +++ b/string_utils.h @@ -0,0 +1,9 @@ +#pragma once + +#include +#include +#include + +using std::string; + +bool matchWildcard(const string& str, const string& pattern); diff --git a/version.cpp b/version.cpp index 7779082..01971f7 100644 --- a/version.cpp +++ b/version.cpp @@ -4,9 +4,9 @@ const unsigned VER_MAJOR = 0; const unsigned VER_MINOR = 1; -const unsigned VER_BUILD = 77; +const unsigned VER_BUILD = 156; -const char* VER_STRING = "version 0.1.77 built on 2014/01/13 23:50:57"; +const char* VER_STRING = "version 0.1.156 built on 2014/01/17 00:50:57"; #ifdef _DEBUG const char* MODE_STRING = "DEBUG";