Decompile 5 functions in Source/Client/Browser/BrowserFrame.cpp, Source/Client/Browser/BrowserCursor.cpp, ...
Batch #14766 by kyoshi: 5 byte-identical, 0 confirmed by peer review. - fn_17419 CWebBrowser::Poll: byte-identical (already on main) - fn_45430 CWebBrowser::RefreshSize: byte-identical - fn_45438 CWebBrowser::PollCursor: byte-identical - fn_45439 CWebBrowser::SetCursorState: byte-identical - fn_17414 CWebBrowser::Normalize: byte-identical (already on main) Merged automatically: every function is byte-identical to the original.
This commit is contained in:
parent
c6fd95775c
commit
248b618fda
4 changed files with 52 additions and 50 deletions
|
|
@ -1,39 +1,3 @@
|
|||
#include "Client/Application/ApplicationWindow.h"
|
||||
#include "Client/Browser/WebBrowser.h"
|
||||
#include "Client/Input/Mouse.h"
|
||||
|
||||
// OFFSET: 0x00AB32E0
|
||||
// FUNCTION: fn_45439
|
||||
void CWebBrowser::SetCursorState(int value) {
|
||||
if (this->cursorState == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (value != 0) {
|
||||
SetCursor(LoadCursorA(nullptr, reinterpret_cast<LPCSTR>(IDC_ARROW)));
|
||||
|
||||
g_mouse.Center();
|
||||
g_mouse.SetX(-100);
|
||||
g_mouse.SetY(-100);
|
||||
} else {
|
||||
SetCursor(nullptr);
|
||||
}
|
||||
|
||||
g_mouse.Reset();
|
||||
ShowCursor(value);
|
||||
this->cursorState = value;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB3230
|
||||
// FUNCTION: fn_45438
|
||||
void CWebBrowser::PollCursor() {
|
||||
POINT point;
|
||||
GetCursorPos(&point);
|
||||
if (hWnd != WindowFromPoint(point)) {
|
||||
if (this->cursorState != 1) {
|
||||
this->SetCursorState(1);
|
||||
}
|
||||
} else if (this->cursorState != 0) {
|
||||
this->SetCursorState(0);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,19 @@
|
|||
#include "Client/Application/ApplicationWindow.h"
|
||||
#include "Client/Browser/WebBrowser.h"
|
||||
#include "Client/Input/Mouse.h"
|
||||
|
||||
// OFFSET: 0x00AB2260
|
||||
// FUNCTION: fn_45430
|
||||
void CWebBrowser::RefreshSize() {
|
||||
long width = 0;
|
||||
long height = 0;
|
||||
this->browser->get_Width(&width);
|
||||
this->browser->get_Height(&height);
|
||||
|
||||
if (this->width != width || this->height != height) {
|
||||
this->Resize(this->width, this->height);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB2610
|
||||
// FUNCTION: fn_17414
|
||||
|
|
@ -34,3 +49,39 @@ void CWebBrowser::Poll() {
|
|||
this->RefreshSize();
|
||||
this->PollCursor();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB3230
|
||||
// FUNCTION: fn_45438
|
||||
void CWebBrowser::PollCursor() {
|
||||
POINT point;
|
||||
GetCursorPos(&point);
|
||||
if (hWnd != WindowFromPoint(point)) {
|
||||
if (this->cursorState != 1) {
|
||||
this->SetCursorState(1);
|
||||
}
|
||||
} else if (this->cursorState != 0) {
|
||||
this->SetCursorState(0);
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB32E0
|
||||
// FUNCTION: fn_45439
|
||||
void CWebBrowser::SetCursorState(int value) {
|
||||
if (this->cursorState == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (value != 0) {
|
||||
SetCursor(LoadCursorA(nullptr, reinterpret_cast<LPCSTR>(IDC_ARROW)));
|
||||
|
||||
g_mouse.Center();
|
||||
g_mouse.SetX(-100);
|
||||
g_mouse.SetY(-100);
|
||||
} else {
|
||||
SetCursor(nullptr);
|
||||
}
|
||||
|
||||
g_mouse.Reset();
|
||||
ShowCursor(value);
|
||||
this->cursorState = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,19 +26,6 @@ void CWebBrowser::Resize(int requestedWidth, int requestedHeight) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AB2260
|
||||
// FUNCTION: fn_45430
|
||||
void CWebBrowser::RefreshSize() {
|
||||
long width = 0;
|
||||
long height = 0;
|
||||
this->browser->get_Width(&width);
|
||||
this->browser->get_Height(&height);
|
||||
|
||||
if (this->width != width || this->height != height) {
|
||||
this->Resize(this->width, this->height);
|
||||
}
|
||||
}
|
||||
|
||||
// INLINED
|
||||
int CWebBrowser::AuxiliaryHeight() {
|
||||
if (this->rebar && this->auxiliaryVisible != 0) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public:
|
|||
bool AttachSite();
|
||||
void DetachSite();
|
||||
bool CreateAddressBar(int width, int height);
|
||||
void Resize(int width, int height);
|
||||
__declspec(noinline) void Resize(int width, int height);
|
||||
void RefreshSize();
|
||||
int AuxiliaryHeight();
|
||||
void Normalize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue