Skip to content

Commit

Permalink
Switch to unsafe blocks for SHVDN
Browse files Browse the repository at this point in the history
Closes #119
  • Loading branch information
justalemon committed Dec 19, 2023
1 parent 3bd459d commit e97af6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions LemonUI/Scaleform/BaseScaleform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,9 @@ public void Dispose()
NativeFunction.CallByHash<int>(0x6DD8F5AA635EB4B2, idPtr);
}
#elif SHVDN3 || SHVDNC
using (OutputArgument idPtr = new OutputArgument(id))
unsafe
{
Function.Call(Hash.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED, idPtr);
Function.Call(Hash.SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED, &id);
}
#endif
}
Expand Down
7 changes: 2 additions & 5 deletions LemonUI/Tools/SafeZone.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,9 @@ public static PointF GetSafePosition(float x, float y)
realY = argY.GetValue<float>();
}
#elif SHVDN3 || SHVDNC
using (OutputArgument argX = new OutputArgument())
using (OutputArgument argY = new OutputArgument())
unsafe
{
Function.Call((Hash)0x6DD8F5AA635EB4B2, relativeX, relativeY, argX, argY); // _GET_SCRIPT_GFX_POSITION
realX = argX.GetResult<float>();
realY = argY.GetResult<float>();
Function.Call(Hash.GET_SCRIPT_GFX_ALIGN_POSITION, relativeX, relativeY, &realX, &realY);
}
#endif

Expand Down

0 comments on commit e97af6c

Please sign in to comment.