x64 crash fix

This is for people involved in the developement of Snes9x, or SNES emulators in general.
BUG REPORTS BELONG IN TECH SUPPORT/BUG TRACKING!
Post Reply
DaMan
Snes9x White Belt
Posts: 27
Joined: Thu Jan 22, 2015 2:35 pm

x64 crash fix

Post by DaMan »

Opening input config/customize hotkey would crash 64bit builds made with VS10 and newer (assuming it doesn't affect VS08 since official builds don't crash).
Attachments
Fix-x64.zip
(1.36 KiB) Downloaded 1664 times
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: x64 crash fix

Post by OV2 »

Thanks, merged to github.
DaMan
Snes9x White Belt
Posts: 27
Joined: Thu Jan 22, 2015 2:35 pm

Re: x64 crash fix

Post by DaMan »

You're welcome, but you missed a few things.
GetClassLong -> GetClassLongPtr in wsnes.cpp.
GetWindowLong -> GetWindowLongPtr in InputCustom.cpp and on line 841

Code: Select all

SetWindowLongPtr(hwnd, 0, (LONG)icp);
to

Code: Select all

SetWindowLongPtr(hwnd, 0, (LONG_PTR)icp);
User avatar
OV2
Official Win32 Porter/Dev
Posts: 679
Joined: Thu Aug 30, 2007 10:15 pm

Re: x64 crash fix

Post by OV2 »

Thanks again - that's what happens if you only look at the diff file instead of applying it ;)

However I don't see any GetClassLong calls in the entire project.
DaMan
Snes9x White Belt
Posts: 27
Joined: Thu Jan 22, 2015 2:35 pm

Re: x64 crash fix

Post by DaMan »

My bad it was also a GetClassLong in inputcustom. Was watching TV when I was writing that out and multitasking isn't my strong point.
Post Reply