mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- cleaned up inconsistent leading whitespaces
Bump copyright year as well
This commit is contained in:
parent
e84b360cb5
commit
7f864d563c
2 changed files with 40 additions and 40 deletions
|
@ -2,7 +2,7 @@
|
||||||
** i_main.mm
|
** i_main.mm
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2012-2015 Alexey Lysiuk
|
** Copyright 2012-2018 Alexey Lysiuk
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -393,23 +393,23 @@ extern bool AppActive;
|
||||||
|
|
||||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask
|
||||||
untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
|
untilDate:[NSDate dateWithTimeIntervalSinceNow:0]
|
||||||
inMode:NSDefaultRunLoopMode
|
inMode:NSDefaultRunLoopMode
|
||||||
dequeue:YES];
|
dequeue:YES];
|
||||||
if (nil == event)
|
if (nil == event)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
I_ProcessEvent(event);
|
I_ProcessEvent(event);
|
||||||
|
|
||||||
[NSApp sendEvent:event];
|
[NSApp sendEvent:event];
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSApp updateWindows];
|
[NSApp updateWindows];
|
||||||
|
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
** i_system.mm
|
** i_system.mm
|
||||||
**
|
**
|
||||||
**---------------------------------------------------------------------------
|
**---------------------------------------------------------------------------
|
||||||
** Copyright 2012-2015 Alexey Lysiuk
|
** Copyright 2012-2018 Alexey Lysiuk
|
||||||
** All rights reserved.
|
** All rights reserved.
|
||||||
**
|
**
|
||||||
** Redistribution and use in source and binary forms, with or without
|
** Redistribution and use in source and binary forms, with or without
|
||||||
|
@ -65,7 +65,7 @@ void I_Tactile(int /*on*/, int /*off*/, int /*total*/)
|
||||||
ticcmd_t* I_BaseTiccmd()
|
ticcmd_t* I_BaseTiccmd()
|
||||||
{
|
{
|
||||||
static ticcmd_t emptycmd;
|
static ticcmd_t emptycmd;
|
||||||
return &emptycmd;
|
return &emptycmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -111,16 +111,16 @@ void I_Init(void)
|
||||||
DumpCPUInfo(&CPU);
|
DumpCPUInfo(&CPU);
|
||||||
|
|
||||||
atterm(I_ShutdownSound);
|
atterm(I_ShutdownSound);
|
||||||
I_InitSound();
|
I_InitSound();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int has_exited;
|
static int has_exited;
|
||||||
|
|
||||||
void I_Quit()
|
void I_Quit()
|
||||||
{
|
{
|
||||||
has_exited = 1; // Prevent infinitely recursive exits -- killough
|
has_exited = 1; // Prevent infinitely recursive exits -- killough
|
||||||
|
|
||||||
if (demorecording)
|
if (demorecording)
|
||||||
{
|
{
|
||||||
G_CheckDemoStatus();
|
G_CheckDemoStatus();
|
||||||
}
|
}
|
||||||
|
@ -134,11 +134,11 @@ bool gameisdead;
|
||||||
|
|
||||||
void I_FatalError(const char* const error, ...)
|
void I_FatalError(const char* const error, ...)
|
||||||
{
|
{
|
||||||
static bool alreadyThrown = false;
|
static bool alreadyThrown = false;
|
||||||
gameisdead = true;
|
gameisdead = true;
|
||||||
|
|
||||||
if (!alreadyThrown) // ignore all but the first message -- killough
|
if (!alreadyThrown) // ignore all but the first message -- killough
|
||||||
{
|
{
|
||||||
alreadyThrown = true;
|
alreadyThrown = true;
|
||||||
|
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
|
@ -160,25 +160,25 @@ void I_FatalError(const char* const error, ...)
|
||||||
|
|
||||||
fprintf(stderr, "%s\n", errortext);
|
fprintf(stderr, "%s\n", errortext);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!has_exited) // If it hasn't exited yet, exit now -- killough
|
if (!has_exited) // If it hasn't exited yet, exit now -- killough
|
||||||
{
|
{
|
||||||
has_exited = 1; // Prevent infinitely recursive exits -- killough
|
has_exited = 1; // Prevent infinitely recursive exits -- killough
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_Error(const char* const error, ...)
|
void I_Error(const char* const error, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char errortext[MAX_ERRORTEXT];
|
char errortext[MAX_ERRORTEXT];
|
||||||
|
|
||||||
va_start(argptr, error);
|
va_start(argptr, error);
|
||||||
vsnprintf(errortext, MAX_ERRORTEXT, error, argptr);
|
vsnprintf(errortext, MAX_ERRORTEXT, error, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
throw CRecoverableError(errortext);
|
throw CRecoverableError(errortext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ static int matchfile(struct dirent *ent)
|
||||||
static int matchfile(const struct dirent *ent)
|
static int matchfile(const struct dirent *ent)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0;
|
return fnmatch(pattern, ent->d_name, FNM_NOESCAPE) == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void* I_FindFirst(const char* const filespec, findstate_t* const fileinfo)
|
void* I_FindFirst(const char* const filespec, findstate_t* const fileinfo)
|
||||||
|
@ -292,24 +292,24 @@ void* I_FindFirst(const char* const filespec, findstate_t* const fileinfo)
|
||||||
dir = ".";
|
dir = ".";
|
||||||
}
|
}
|
||||||
|
|
||||||
fileinfo->current = 0;
|
fileinfo->current = 0;
|
||||||
fileinfo->count = scandir(dir.GetChars(), &fileinfo->namelist, matchfile, alphasort);
|
fileinfo->count = scandir(dir.GetChars(), &fileinfo->namelist, matchfile, alphasort);
|
||||||
|
|
||||||
if (fileinfo->count > 0)
|
if (fileinfo->count > 0)
|
||||||
{
|
{
|
||||||
return fileinfo;
|
return fileinfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (void*)-1;
|
return (void*)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int I_FindNext(void* const handle, findstate_t* const fileinfo)
|
int I_FindNext(void* const handle, findstate_t* const fileinfo)
|
||||||
{
|
{
|
||||||
findstate_t* const state = static_cast<findstate_t*>(handle);
|
findstate_t* const state = static_cast<findstate_t*>(handle);
|
||||||
|
|
||||||
if (state->current < fileinfo->count)
|
if (state->current < fileinfo->count)
|
||||||
{
|
{
|
||||||
return ++state->current < fileinfo->count ? 0 : -1;
|
return ++state->current < fileinfo->count ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in a new issue