void SafeClickInit(bool bIsInit) { if (bIsInit) { if (SettingGet("SafeClick")) { PlantDetourCall((BYTE *)dwGameDll + 0x54D97F, (BYTE *)(DWORD_PTR)SendAction_interception, 5); bIsSafeClickEnable = true; } return; } if (!bIsSafeClickEnable) { PlantDetourCall((BYTE *)dwGameDll + 0x54D97F, (BYTE *)(DWORD_PTR)SendAction_interception, 5); TextPrint("|CFFFCD211Xenon|R: SafeClick turned |CFF00FF00On|R."); bIsSafeClickEnable = true; } else { Patch(dwGameDll + 0x54D97F, "\xE8\x4C\x5B\xF7\xFF", 5); TextPrint("|CFFFCD211Xenon|R: SafeClick turned |CFFFF0000Off|R."); bIsSafeClickEnable = false; } }
/** * Log a message */ static void Overflow (msg_cb_data_t *p_sys, msg_item_t *p_item, unsigned overruns) { VLC_UNUSED(overruns); int verbosity = var_CreateGetInteger( p_sys->p_intf, "verbose" ); int priority = 0; switch( p_item->i_type ) { case VLC_MSG_WARN: priority = 1; break; case VLC_MSG_DBG: priority = 2; break; } if (verbosity < priority) return; int canc = vlc_savecancel(); switch( p_sys->i_mode ) { case MODE_HTML: HtmlPrint( p_item, p_sys->p_file ); break; #ifdef HAVE_SYSLOG_H case MODE_SYSLOG: SyslogPrint( p_item ); break; #endif case MODE_TEXT: default: TextPrint( p_item, p_sys->p_file ); break; } vlc_restorecancel( canc ); }
void WoodCutter() { if (!bWoodCutter) { Patch(dwGameDll + 0x3A1505, "\x74", 1); TextPrint("|CFFFCD211Xenon|R: WoodCutter turned |CFF00FF00On|R."); bWoodCutter = true; } else { Patch(dwGameDll + 0x3A1505, "\x75", 1); TextPrint("|CFFFCD211Xenon|R: WoodCutter turned |CFFFF0000Off|R."); bWoodCutter = false; } }
/** * Log a message */ static void Overflow (msg_cb_data_t *p_sys, msg_item_t *p_item, unsigned overruns) { VLC_UNUSED(overruns); int verbosity = var_InheritInteger( p_sys->p_intf, "log-verbose" ); if (verbosity == -1) verbosity = var_InheritInteger( p_sys->p_intf, "verbose" ); switch( p_item->i_type ) { case VLC_MSG_INFO: case VLC_MSG_ERR: if( verbosity < 0 ) return; break; case VLC_MSG_WARN: if( verbosity < 1 ) return; break; case VLC_MSG_DBG: if( verbosity < 2 ) return; break; } int canc = vlc_savecancel(); switch( p_sys->i_mode ) { case MODE_HTML: HtmlPrint( p_item, p_sys->p_file ); break; #ifdef HAVE_SYSLOG_H case MODE_SYSLOG: SyslogPrint( p_item ); break; #endif case MODE_TEXT: default: TextPrint( p_item, p_sys->p_file ); break; } vlc_restorecancel( canc ); }