forked from Mirrors/openclonk
Remove RECT structure from platformindependant code
parent
6dafb53c15
commit
05146718c0
|
@ -292,14 +292,9 @@ CGImageRef C4ToolsDlg::State::CreatePreviewImage()
|
|||
{
|
||||
SURFACE sfcPreview;
|
||||
int32_t iPrvWdt,iPrvHgt;
|
||||
RECT rect;
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
rect.bottom = [ctrler(&Console).previewView frame].size.height;
|
||||
rect.right = [ctrler(&Console).previewView frame].size.width;
|
||||
|
||||
iPrvWdt=rect.right-rect.left;
|
||||
iPrvHgt=rect.bottom-rect.top;
|
||||
iPrvWdt = [ctrler(&Console).previewView frame].size.width;
|
||||
iPrvHgt = [ctrler(&Console).previewView frame].size.height;
|
||||
|
||||
if (!(sfcPreview=new CSurface(iPrvWdt,iPrvHgt))) return NULL;
|
||||
|
||||
|
|
|
@ -1305,15 +1305,9 @@ void C4ToolsDlg::State::UpdatePreview()
|
|||
|
||||
int32_t iPrvWdt,iPrvHgt;
|
||||
|
||||
RECT rect;
|
||||
/* TODO: Set size request for image to read size from image's size request? */
|
||||
rect.left = 0;
|
||||
rect.top = 0;
|
||||
rect.bottom = 64;
|
||||
rect.right = 64;
|
||||
|
||||
iPrvWdt=rect.right-rect.left;
|
||||
iPrvHgt=rect.bottom-rect.top;
|
||||
iPrvWdt=64;
|
||||
iPrvHgt=64;
|
||||
|
||||
if (!(sfcPreview=new CSurface(iPrvWdt,iPrvHgt))) return;
|
||||
|
||||
|
|
|
@ -630,15 +630,17 @@ namespace C4GUI
|
|||
// update assigned window
|
||||
if (pWindow)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
RECT rtSize;
|
||||
rtSize.left = 0;
|
||||
rtSize.top = 0;
|
||||
rtSize.right = rcBounds.Wdt;
|
||||
rtSize.bottom = rcBounds.Hgt;
|
||||
#ifdef _WIN32
|
||||
if (::AdjustWindowRectEx(&rtSize, ConsoleDlgWindowStyle, false, 0))
|
||||
#endif // _WIN32
|
||||
pWindow->SetSize(rtSize.right-rtSize.left,rtSize.bottom-rtSize.top);
|
||||
#else
|
||||
pWindow->SetSize(rcBounds.Wdt,rcBounds.Hgt);
|
||||
#endif // _WIN32
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -183,11 +183,6 @@ typedef uint32_t DWORD;
|
|||
typedef uint8_t BYTE;
|
||||
typedef uint16_t WORD;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int32_t left; int32_t top; int32_t right; int32_t bottom;
|
||||
} RECT;
|
||||
|
||||
#include <strings.h>
|
||||
inline int stricmp(const char *s1, const char *s2)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue