Having some really weird problem and as beginner with c++ I don't know why.
struct DeviceSettings
{
public:
....somevariables
DXSize BackbufferSize;
....somemethods
};
struct DXPoint;
typedef DXPoint DXSize;
__declspec(align(16)) struct DXPoint
{
public:
union
{
struct
{
int x;
int y;
};
struct
{
int width;
int height;
};
int dataint[2];
__m128i m;
};
DXPoint(void);
DXPoint(int x, int y);
~DXPoint(void);
void operator = (const DXPoint& v);
};
For some reason when i declare a DeviceSettings the app crash cause the DXSize var is not aligned correctly.
But this only if compiled on 32 bit mode. Works fine in 64 bit mode...
Any clues? Am i missing something obvious?