Skip to content

fix#2670

Merged
mercury233 merged 1 commit into
Fluorohydride:masterfrom
yybbwc:patch1
Feb 13, 2025
Merged

fix#2670
mercury233 merged 1 commit into
Fluorohydride:masterfrom
yybbwc:patch1

Conversation

@yybbwc

@yybbwc yybbwc commented Feb 13, 2025

Copy link
Copy Markdown
Contributor
LRESULT SendMessageW(
  [in] HWND   hWnd,
  [in] UINT   Msg,
  [in] WPARAM wParam,
  [in] LPARAM lParam
);

@purerosefallen

Copy link
Copy Markdown
Collaborator

Fixed what? Could you explain?

@yybbwc

yybbwc commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

Fixed what? Could you explain?

编译64位ygopro时,用long会报错,用LPARAM就不会。

@purerosefallen

Copy link
Copy Markdown
Collaborator

Then how to compile YGOPro in 64 bit?

@yybbwc

yybbwc commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

Then how to compile YGOPro in 64 bit?

我在用64位ygopro。

@purerosefallen

Copy link
Copy Markdown
Collaborator

If needed to compile in 64 bit in this case, you have to update premake5.lua to support 64 bit as well.
In addition, you need to define a macro to handle this change just in 64-bit compile mode, rather than changing the code directly.

something like:

#ifdef YGOPRO_64BIT_MODE
	SendMessageW(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmallIcon);
	SendMessageW(hWnd, WM_SETICON, ICON_BIG, (LPARAM)hBigIcon);
#else
	SendMessageW(hWnd, WM_SETICON, ICON_SMALL, (long)hSmallIcon);
	SendMessageW(hWnd, WM_SETICON, ICON_BIG, (long)hBigIcon);
#endif

AND, can you also provide full build script (in premake) to make it build properly in 64-bit mode?

@purerosefallen

Copy link
Copy Markdown
Collaborator

btw is it related to #2661 ?

@mercury233 mercury233 merged commit c2d351c into Fluorohydride:master Feb 13, 2025
@yybbwc

yybbwc commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

rather than changing the code directly.

SendMessageW函数原型用的就是LPARAM,它绑定的是LONG_PTR,而LONG_PTR是指针精度的带符号长类型。LONG_PTR在32位时是long,在64位时是__int64。

you have to update premake5.lua to support 64 bit as well.

我不会。premake支持的平台太多了,而我只用windows,恐怕我改不对。

AND, can you also provide full build script (in premake) to make it build properly in 64-bit mode?

理由同上。而且我不用premake……(不是说premake不好……)

@yybbwc

yybbwc commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

btw is it related to #2661 ?

从代码上说,无关。

@yybbwc yybbwc deleted the patch1 branch February 13, 2025 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants