[DivaMovie] Option to disable PRINT
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
#include <mferror.h>
|
#include <mferror.h>
|
||||||
#include <mftransform.h>
|
#include <mftransform.h>
|
||||||
|
|
||||||
bool forceSoftwareDecoding;
|
bool forceSoftwareDecoding = false, debug = false;
|
||||||
|
|
||||||
IDirect3DDeviceManager9* deviceManager;
|
IDirect3DDeviceManager9* deviceManager;
|
||||||
|
|
||||||
@@ -177,6 +177,7 @@ HOOK(HRESULT, DXVA2CreateDirect3DDeviceManager, PROC_ADDRESS("dxva2.dll", "DXVA2
|
|||||||
|
|
||||||
void loadConfig() {
|
void loadConfig() {
|
||||||
forceSoftwareDecoding = GetPrivateProfileIntW(L"general", L"force_software_decoding", 0, CONFIG_FILE) > 0 ? true : false;
|
forceSoftwareDecoding = GetPrivateProfileIntW(L"general", L"force_software_decoding", 0, CONFIG_FILE) > 0 ? true : false;
|
||||||
|
debug = GetPrivateProfileIntW(L"general", L"debug", 0, CONFIG_FILE) > 0 ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||||
@@ -193,6 +194,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserv
|
|||||||
|
|
||||||
PluginConfig::PluginConfigOption config[] = {
|
PluginConfig::PluginConfigOption config[] = {
|
||||||
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"force_software_decoding", L"general", CONFIG_FILE, L"Force Software Decoding", L"Use software decoding even on systems that support DXVA hardware decoding.", false } },
|
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"force_software_decoding", L"general", CONFIG_FILE, L"Force Software Decoding", L"Use software decoding even on systems that support DXVA hardware decoding.", false } },
|
||||||
|
{ PluginConfig::CONFIG_BOOLEAN, new PluginConfig::PluginConfigBooleanData{ L"debug", L"general", CONFIG_FILE, L"Debug", L"Enable PRINT (possibly at the cost of performance).", false } },
|
||||||
};
|
};
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
|
extern "C" __declspec(dllexport) LPCWSTR GetPluginName(void)
|
||||||
|
|||||||
@@ -22,11 +22,7 @@ std::wstring DirPath() {
|
|||||||
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DivaMovie.ini";
|
std::wstring CONFIG_FILE_STRING = DirPath() + L"\\plugins\\DivaMovie.ini";
|
||||||
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
|
LPCWSTR CONFIG_FILE = CONFIG_FILE_STRING.c_str();
|
||||||
|
|
||||||
//#if _DEBUG
|
#define PRINT(value, ...) if (debug) printf(value, __VA_ARGS__);
|
||||||
#define PRINT(value, ...) printf(value, __VA_ARGS__);
|
|
||||||
//#else
|
|
||||||
//#define PRINT(value, ...)
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
#define PROC_ADDRESS(libraryName, procName) \
|
#define PROC_ADDRESS(libraryName, procName) \
|
||||||
GetProcAddress(LoadLibrary(TEXT(libraryName)), procName)
|
GetProcAddress(LoadLibrary(TEXT(libraryName)), procName)
|
||||||
|
|||||||
Reference in New Issue
Block a user