Closed MikiraSora closed 5 years ago
how did you compile oppai.dll? because as far as i know MSVC uses stdcall by default and i even did a RealtimePPDisplayer port that uses the new API without specifying cdecl and it works fine: https://github.com/OsuSync/RealTimePPDisplayer/pull/26/files#diff-c532c12b308b29f796a4df43691fea8eR162
hmm... maybe 32-bit uses stdcall and 64-bit doesn't, either way I'll add it, thanks for the report
according to msdn
On ARM and x64 processors, __stdcall is accepted and ignored by the compiler; on ARM and x64 architectures, by convention, arguments are passed in registers when possible, and subsequent arguments are passed on the stack.
well, I'm gonna go do some tests with a 64-bit c# project, sec...
I just use VS x86 command promto and open libbuild.dat directly.
BTW , I suggest you have better make a function named ApplyChanged() so that PP and others will be changed after ACC/n100/n50 were changed.
Because I found that the pp doesnt automatic changed when acc are changed until I have to call ezpp()/ezpp_data() again. It's disturbing > <
yea it's normal that you have to re-call ezpp/ezpp_data, it's fine, it caches results and doesn't re-parse the map if not necessary
good idea though, I could make a switch that automatically recalcs when you change parameters
hmm i just wrote and compiled a test c# program and it works for both the 32-bit and 64-bit dll without specifying cdecl. could you try using the dll's from x86 or x64 binaries here: https://github.com/Francesco149/oppai-ng/releases ? also I will try adding -Gz to libbuild.bat to ensure stdcall is forced on 32-bit, you can try this too
I have modified libbuild to force __stdcall, see if that works when you build the dll yourself
this is from latest x86 release and it actually throw exception:
this is x64 release but it throw another exception:
you can clone&run console proj in this repo
that's because you are using x64 dll on x86 or viceversa
if you compile for 32-bit (x86) you need x86 dll. if you compile for 64bit (x64) you need x64 dll
yep , I pulled master branch just now and compile right x86/stdcall dll file successfully. thank you :D
In your rtpp PR ,we have to updated other plugins which depend oppai and then merge your pr for test. I think I could close this issue.
btw i just added the autocalc thing, try ezpp_set_autocalc(ez, 1);
the library api default use cdecl , so other lang maybe have to add calling convention description explicitly or will throw exception .![](https://puu.sh/COXe8/bf58f6b441.png)