@@ -15,19 +15,19 @@ DEFINE_SINGLETON_SCOPE( Hearthstone )
15
15
16
16
Hearthstone::Hearthstone() {
17
17
#ifdef Q_WS_MAC
18
- capture = new OSXWindowCapture ( " Hearthstone" );
18
+ mCapture = new OSXWindowCapture ( " Hearthstone" );
19
19
#elif defined Q_WS_WIN
20
- capture = new WinWindowCapture ( " Hearthstone" );
20
+ mCapture = new WinWindowCapture ( " Hearthstone" );
21
21
#endif
22
22
}
23
23
24
24
Hearthstone::~Hearthstone () {
25
- if ( capture != NULL )
26
- delete capture ;
25
+ if ( mCapture != NULL )
26
+ delete mCapture ;
27
27
}
28
28
29
- bool Hearthstone::IsRunning () {
30
- return capture ->WindowFound ();
29
+ bool Hearthstone::Running () {
30
+ return mCapture ->WindowFound ();
31
31
}
32
32
33
33
#ifdef Q_WS_WIN
@@ -36,11 +36,11 @@ inline float roundf( float x ) {
36
36
}
37
37
#endif
38
38
39
- QPixmap Hearthstone::Capture (int vx, int vy, int vw, int vh) {
39
+ QPixmap Hearthstone::Capture ( int vx, int vy, int vw, int vh ) {
40
40
int x, y, w, h;
41
41
42
- int realCanvasWidth = capture-> GetWidth ();
43
- int realCanvasHeight = capture-> GetHeight ();
42
+ int realCanvasWidth = mCapture -> Width ();
43
+ int realCanvasHeight = mCapture -> Height ();
44
44
45
45
int virtualCanvasWidth = VIRTUAL_CANVAS_WIDTH;
46
46
int virtualCanvasHeight = VIRTUAL_CANVAS_HEIGHT;
@@ -55,14 +55,14 @@ QPixmap Hearthstone::Capture(int vx, int vy, int vw, int vh) {
55
55
w = roundf ( vw * scale );
56
56
h = roundf ( vh * scale );
57
57
58
- return capture ->Capture ( x, y, w, h );
58
+ return mCapture ->Capture ( x, y, w, h );
59
59
}
60
60
61
- void Hearthstone::SetWindowCapture ( WindowCapture *wc ) {
62
- if ( capture != NULL )
63
- delete capture ;
61
+ void Hearthstone::SetWindowCapture ( WindowCapture *windowCapture ) {
62
+ if ( mCapture != NULL )
63
+ delete mCapture ;
64
64
65
- capture = wc ;
65
+ mCapture = windowCapture ;
66
66
}
67
67
68
68
void Hearthstone::EnableLogging () {
@@ -81,7 +81,7 @@ void Hearthstone::EnableLogging() {
81
81
file.close ();
82
82
83
83
LOG ( " Ingame Log activated." );
84
- if ( IsRunning () ) {
84
+ if ( Running () ) {
85
85
LOG (" Please restart Hearthstone for logging to take effect." );
86
86
}
87
87
}
@@ -101,7 +101,7 @@ string Hearthstone::LogConfigPath() {
101
101
QString homeLocation = QDesktopServices::storageLocation ( QDesktopServices::HomeLocation );
102
102
QString configPath = homeLocation + " /Library/Preferences/Blizzard/Hearthstone/log.config" ;
103
103
#elif defined Q_WS_WIN
104
- char buffer[MAX_PATH];
104
+ char buffer[ MAX_PATH ];
105
105
SHGetSpecialFolderPathA ( NULL , buffer, CSIDL_LOCAL_APPDATA, FALSE );
106
106
QString localAppData ( buffer );
107
107
QString configPath = localAppData + " \\ Blizzard\\ Hearthstone\\ log.config" ;
@@ -129,10 +129,10 @@ string Hearthstone::LogPath() {
129
129
return logPath.toStdString ();
130
130
}
131
131
132
- int Hearthstone::GetWidth () {
133
- return capture-> GetWidth ();
132
+ int Hearthstone::Width () {
133
+ return mCapture -> Width ();
134
134
}
135
135
136
- int Hearthstone::GetHeight () {
137
- return capture-> GetHeight ();
136
+ int Hearthstone::Height () {
137
+ return mCapture -> Height ();
138
138
}
0 commit comments