Skip to content

Commit

Permalink
FIX(positional-audio): Force 8 bytes alignment for CCameraAngles in G…
Browse files Browse the repository at this point in the history
…TAV plugin

https://en.cppreference.com/w/cpp/language/alignas

This fixes compilation when the implicit alignment is not 8 bytes.

It can be the case with 32 bit targets.
  • Loading branch information
davidebeatrici committed Sep 1, 2022
1 parent 9740675 commit 13c051b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/gtav/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ struct CCameraManagerAngles {
ptr_t cameraAngles; // CCameraAngles *
};

struct CCameraAngles {
struct alignas(8) CCameraAngles {
uint8_t pad1[960];
ptr_t playerAngles; // CPlayerAngles *
uint8_t pad2[60];
Expand Down

0 comments on commit 13c051b

Please sign in to comment.