summaryrefslogtreecommitdiff
path: root/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2018-12-29 20:59:57 +1300
committerboris <wzn@moneybot.cc>2018-12-29 20:59:57 +1300
commitbdb6ac5f940008bcd836e3c5f0a708f4b8f04865 (patch)
tree9d3ba5e0816dfd6295f8e38e1a865d061f1168e1 /csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp
parent81a3987fc17f99d2092018ac266882f4533cc27e (diff)
protection shit
Diffstat (limited to 'csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp')
-rw-r--r--csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp b/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp
index a05cba6..fc1892b 100644
--- a/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp
+++ b/csgo-loader/csgo-client/UserExperience/MoneybotShared/window.cpp
@@ -2,6 +2,7 @@
#include "window.hpp"
#include "d3d.hpp"
#include "math.hpp"
+#include <time.h>
d3d::c_window g_window;
@@ -16,8 +17,12 @@ namespace d3d
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
+ // math::random_number was NOT random
+ // so fuck you and your use of STL
+ srand((uint32_t)time(0));
+
int i = 0;
- for(; i < math::random_number(16, 31); ++i) {
+ for(; i < ((rand()%31)+16); ++i) {
m_window_name[i] = alphanum[rand() % (sizeof(alphanum) - 1)];
}
@@ -131,12 +136,13 @@ namespace d3d
}
if( m_d3d_device ) {
- auto device_state = m_d3d_device->TestCooperativeLevel( );
- if( device_state != D3D_OK ) {
- g_d3d.on_device_lost( );
- m_d3d_device->Reset( &m_present_params );
- g_d3d.on_device_reset( );
- }
+ // Caused crashing when UAC prompt appeared.
+ //auto device_state = m_d3d_device->TestCooperativeLevel( );
+ //if( device_state != D3D_OK ) {
+ // g_d3d.on_device_lost( );
+ // m_d3d_device->Reset( &m_present_params );
+ // g_d3d.on_device_reset( );
+ //}
if( m_d3d_device->BeginScene( ) >= 0 ) {