- added a default cursor for Chex Quest.
- set 'cursor' as default for Action Doom 2. Doom's bunny is probably not the best thing here... - made cursor user-settable in the menu. SVN r2855 (trunk)
This commit is contained in:
parent
cf9792ed53
commit
9abaaa1785
6 changed files with 55 additions and 21 deletions
|
|
@ -1186,28 +1186,33 @@ bool I_SetCursor(FTexture *cursorpic)
|
|||
{
|
||||
HCURSOR cursor;
|
||||
|
||||
// Must be no larger than 32x32.
|
||||
if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32)
|
||||
if (cursorpic != NULL && cursorpic->UseType != FTexture::TEX_Null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Must be no larger than 32x32.
|
||||
if (cursorpic->GetWidth() > 32 || cursorpic->GetHeight() > 32)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
cursor = CreateAlphaCursor(cursorpic);
|
||||
if (cursor == NULL)
|
||||
{
|
||||
cursor = CreateCompatibleCursor(cursorpic);
|
||||
cursor = CreateAlphaCursor(cursorpic);
|
||||
if (cursor == NULL)
|
||||
{
|
||||
cursor = CreateCompatibleCursor(cursorpic);
|
||||
}
|
||||
if (cursor == NULL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Replace the existing cursor with the new one.
|
||||
DestroyCustomCursor();
|
||||
CustomCursor = cursor;
|
||||
atterm(DestroyCustomCursor);
|
||||
}
|
||||
if (cursor == NULL)
|
||||
else
|
||||
{
|
||||
return false;
|
||||
DestroyCustomCursor();
|
||||
cursor = LoadCursor(NULL, IDC_ARROW);
|
||||
}
|
||||
// Replace the existing cursor with the new one.
|
||||
if (CustomCursor != NULL)
|
||||
{
|
||||
DestroyCursor(CustomCursor);
|
||||
}
|
||||
CustomCursor = cursor;
|
||||
atterm(DestroyCustomCursor);
|
||||
SetClassLongPtr(Window, GCLP_HCURSOR, (LONG_PTR)cursor);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue