25,12 → 25,9 |
}; |
|
char draw_buf_not_enaught_ram[] = |
"'DrawBufer needs more memory than currenly available. |
Application could be unstable. |
"'DrawBufer requested %i MB more memory than the system has. |
Application could be unstable.' -E"; |
|
Requested size: %i Mb |
Free RAM: %i Mb' -E"; |
|
bool DrawBufer::Init(dword i_bufx, i_bufy, i_bufw, i_bufh) |
{ |
bufx = i_bufx; |
189,8 → 186,8 |
} |
|
free_ram_size = GetFreeRAM() * 1024; |
if (alloc_size >= free_ram_size) { |
sprintf(#error_str, #draw_buf_not_enaught_ram, alloc_size/1048576, free_ram_size/1048576); |
if (alloc_size > free_ram_size) { |
sprintf(#error_str, #draw_buf_not_enaught_ram, alloc_size - free_ram_size/1048576); |
notify(#error_str); |
} |
} |