Started Windows TODO resolution.
This commit is contained in:
parent
e114502605
commit
56cb25b230
|
@ -14,14 +14,15 @@ void initAlloc(void)
|
||||||
void uninitAlloc(void)
|
void uninitAlloc(void)
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
std::string ossstr; // keep alive, just to be safe
|
||||||
|
|
||||||
if (heap.size() == 0)
|
if (heap.size() == 0)
|
||||||
return;
|
return;
|
||||||
for (const auto &alloc : heap)
|
for (const auto &alloc : heap)
|
||||||
// note the void * cast; otherwise it'll be treated as a string
|
// note the void * cast; otherwise it'll be treated as a string
|
||||||
oss << (void *) (alloc.first) << " " << types[alloc.second] << "\n";
|
oss << (void *) (alloc.first) << " " << types[alloc.second] << "\n";
|
||||||
// TODO keep oss.str() alive?
|
ossstr = oss.str();
|
||||||
userbug("Some data was leaked; either you left a uiControl lying around or there's a bug in libui itself. Leaked data:\n%s", oss.str().c_str());
|
userbug("Some data was leaked; either you left a uiControl lying around or there's a bug in libui itself. Leaked data:\n%s", ossstr.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
#define rawBytes(pa) (&((*pa)[0]))
|
#define rawBytes(pa) (&((*pa)[0]))
|
||||||
|
|
|
@ -69,7 +69,8 @@ ATOM registerAreaClass(HICON hDefaultIcon, HCURSOR hDefaultCursor)
|
||||||
wc.hIcon = hDefaultIcon;
|
wc.hIcon = hDefaultIcon;
|
||||||
wc.hCursor = hDefaultCursor;
|
wc.hCursor = hDefaultCursor;
|
||||||
wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
|
wc.hbrBackground = (HBRUSH) (COLOR_BTNFACE + 1);
|
||||||
// TODO specify CS_HREDRAW/CS_VREDRAW in addition to or instead of calling InvalidateRect(NULL) in WM_WINDOWPOSCHANGED above, or not at all?
|
// this is just to be safe; see the InvalidateRect() call in the WM_WINDOWPOSCHANGED handler for more details
|
||||||
|
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||||
return RegisterClassW(&wc);
|
return RegisterClassW(&wc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue