Fixed tabs to spaces

Sam Lantinga 2017-09-10 12:40:45 -07:00
parent 8ed16ea465
commit 849c4c1472
1 changed files with 18 additions and 18 deletions

View File

@ -722,21 +722,21 @@ int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect)
int int
SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi) SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi)
{ {
SDL_VideoDisplay *display; SDL_VideoDisplay *display;
CHECK_DISPLAY_INDEX(displayIndex, -1); CHECK_DISPLAY_INDEX(displayIndex, -1);
display = &_this->displays[displayIndex]; display = &_this->displays[displayIndex];
if (_this->GetDisplayDPI) { if (_this->GetDisplayDPI) {
if (_this->GetDisplayDPI(_this, display, ddpi, hdpi, vdpi) == 0) { if (_this->GetDisplayDPI(_this, display, ddpi, hdpi, vdpi) == 0) {
return 0; return 0;
} }
} else { } else {
return SDL_Unsupported(); return SDL_Unsupported();
} }
return -1; return -1;
} }
SDL_bool SDL_bool
@ -1394,7 +1394,7 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
if (flags & SDL_WINDOW_VULKAN) { if (flags & SDL_WINDOW_VULKAN) {
if (!_this->Vulkan_CreateSurface) { if (!_this->Vulkan_CreateSurface) {
SDL_SetError("Vulkan support is either not configured in SDL " SDL_SetError("Vulkan support is either not configured in SDL "
"or not available in video driver"); "or not available in video driver");
return NULL; return NULL;
} }
if (flags & SDL_WINDOW_OPENGL) { if (flags & SDL_WINDOW_OPENGL) {
@ -2093,13 +2093,13 @@ SDL_HideWindow(SDL_Window * window)
return; return;
} }
window->is_hiding = SDL_TRUE; window->is_hiding = SDL_TRUE;
SDL_UpdateFullscreenMode(window, SDL_FALSE); SDL_UpdateFullscreenMode(window, SDL_FALSE);
if (_this->HideWindow) { if (_this->HideWindow) {
_this->HideWindow(_this, window); _this->HideWindow(_this, window);
} }
window->is_hiding = SDL_FALSE; window->is_hiding = SDL_FALSE;
SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIDDEN, 0, 0); SDL_SendWindowEvent(window, SDL_WINDOWEVENT_HIDDEN, 0, 0);
} }
@ -2944,8 +2944,8 @@ SDL_GL_DeduceMaxSupportedESProfile(int* major, int* minor)
/* THIS REQUIRES AN EXISTING GL CONTEXT THAT HAS BEEN MADE CURRENT. */ /* THIS REQUIRES AN EXISTING GL CONTEXT THAT HAS BEEN MADE CURRENT. */
/* Please refer to https://bugzilla.libsdl.org/show_bug.cgi?id=3725 for discussion. */ /* Please refer to https://bugzilla.libsdl.org/show_bug.cgi?id=3725 for discussion. */
#if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
/* XXX This is fragile; it will break in the event of release of /* XXX This is fragile; it will break in the event of release of
* new versions of OpenGL ES. * new versions of OpenGL ES.
*/ */
if (SDL_GL_ExtensionSupported("GL_ARB_ES3_2_compatibility")) { if (SDL_GL_ExtensionSupported("GL_ARB_ES3_2_compatibility")) {
*major = 3; *major = 3;
@ -3910,13 +3910,13 @@ SDL_SetWindowHitTest(SDL_Window * window, SDL_HitTest callback, void *userdata)
float float
SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches) SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches)
{ {
float den2 = hinches * hinches + vinches * vinches; float den2 = hinches * hinches + vinches * vinches;
if (den2 <= 0.0f) { if (den2 <= 0.0f) {
return 0.0f; return 0.0f;
} }
return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) / return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) /
SDL_sqrt((double)den2)); SDL_sqrt((double)den2));
} }
/* /*