Sfoglia il codice sorgente

Remove trailing spaces

pull/5113/head
Ray 1 mese fa
parent
commit
a9970484f3
6 ha cambiato i file con 16 aggiunte e 16 eliminazioni
  1. +1
    -1
      examples/examples_list.txt
  2. +3
    -3
      src/platforms/rcore_desktop_glfw.c
  3. +1
    -1
      src/platforms/rcore_desktop_sdl.c
  4. +2
    -2
      src/platforms/rcore_web.c
  5. +8
    -8
      src/rcore.c
  6. +1
    -1
      src/rlgl.h

+ 1
- 1
examples/examples_list.txt Vedi File

@ -3,7 +3,7 @@
# examples must be provided as: <example_category>;<example_name>;<example_stars>;<raylib_created_version>;<raylib_last_update_version>;"<example_author_name>";<author_github_user> # examples must be provided as: <example_category>;<example_name>;<example_stars>;<raylib_created_version>;<raylib_last_update_version>;"<example_author_name>";<author_github_user>
# #
# This list is used as the main reference by [rexm] tool for examples collection validation and management # This list is used as the main reference by [rexm] tool for examples collection validation and management
# New examples must be added to this list and any possible rename must be made on this list first
# New examples must be added to this list and any possible rename must be made on this list first
# #
# WARNING: List is not ordered by example name but by the display order on web # WARNING: List is not ordered by example name but by the display order on web
# #

+ 3
- 3
src/platforms/rcore_desktop_glfw.c Vedi File

@ -1365,7 +1365,7 @@ int InitPlatform(void)
// Window flags requested before initialization to be applied after initialization // Window flags requested before initialization to be applied after initialization
unsigned int requestedWindowFlags = CORE.Window.flags; unsigned int requestedWindowFlags = CORE.Window.flags;
// Check window creation flags // Check window creation flags
if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) CORE.Window.fullscreen = true; if ((CORE.Window.flags & FLAG_FULLSCREEN_MODE) > 0) CORE.Window.fullscreen = true;
@ -1663,7 +1663,7 @@ int InitPlatform(void)
int monitorHeight = 0; int monitorHeight = 0;
glfwGetMonitorWorkarea(monitor, &monitorX, &monitorY, &monitorWidth, &monitorHeight); glfwGetMonitorWorkarea(monitor, &monitorX, &monitorY, &monitorWidth, &monitorHeight);
// Here CORE.Window.render.width/height should be used instead of
// Here CORE.Window.render.width/height should be used instead of
// CORE.Window.screen.width/height to center the window correctly when the high dpi flag is enabled // CORE.Window.screen.width/height to center the window correctly when the high dpi flag is enabled
int posX = monitorX + (monitorWidth - (int)CORE.Window.render.width)/2; int posX = monitorX + (monitorWidth - (int)CORE.Window.render.width)/2;
int posY = monitorY + (monitorHeight - (int)CORE.Window.render.height)/2; int posY = monitorY + (monitorHeight - (int)CORE.Window.render.height)/2;
@ -1675,7 +1675,7 @@ int InitPlatform(void)
CORE.Window.position.x = posX; CORE.Window.position.x = posX;
CORE.Window.position.y = posY; CORE.Window.position.y = posY;
} }
// Apply window flags requested previous to initialization // Apply window flags requested previous to initialization
SetWindowState(requestedWindowFlags); SetWindowState(requestedWindowFlags);

+ 1
- 1
src/platforms/rcore_desktop_sdl.c Vedi File

@ -1103,7 +1103,7 @@ Vector2 GetWindowScaleDPI(void)
TRACELOG(LOG_WARNING, "GetWindowScaleDPI() not implemented on target platform"); TRACELOG(LOG_WARNING, "GetWindowScaleDPI() not implemented on target platform");
#else #else
scale.x = SDL_GetWindowDisplayScale(platform.window); scale.x = SDL_GetWindowDisplayScale(platform.window);
scale.y = scale.x;
scale.y = scale.x;
#endif #endif
return scale; return scale;

+ 2
- 2
src/platforms/rcore_web.c Vedi File

@ -1355,7 +1355,7 @@ int InitPlatform(void)
emscripten_set_blur_callback(GetCanvasId(), platform.handle, 1, EmscriptenFocusCallback); emscripten_set_blur_callback(GetCanvasId(), platform.handle, 1, EmscriptenFocusCallback);
emscripten_set_focus_callback(GetCanvasId(), platform.handle, 1, EmscriptenFocusCallback); emscripten_set_focus_callback(GetCanvasId(), platform.handle, 1, EmscriptenFocusCallback);
emscripten_set_visibilitychange_callback(NULL, 1, EmscriptenVisibilityChangeCallback); emscripten_set_visibilitychange_callback(NULL, 1, EmscriptenVisibilityChangeCallback);
// WARNING: Below resize code was breaking fullscreen mode for sample games and examples, it needs review // WARNING: Below resize code was breaking fullscreen mode for sample games and examples, it needs review
// Check fullscreen change events(note this is done on the window since most browsers don't support this on #canvas) // Check fullscreen change events(note this is done on the window since most browsers don't support this on #canvas)
// emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 1, EmscriptenResizeCallback); // emscripten_set_fullscreenchange_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, NULL, 1, EmscriptenResizeCallback);
@ -1623,7 +1623,7 @@ static void MouseEnterCallback(GLFWwindow *window, int enter)
static EM_BOOL EmscriptenKeyboardCallback(int eventType, const EmscriptenKeyboardEvent *keyboardEvent, void *userData) static EM_BOOL EmscriptenKeyboardCallback(int eventType, const EmscriptenKeyboardEvent *keyboardEvent, void *userData)
{ {
// WARNING: Keyboard inputs already processed through GLFW callback // WARNING: Keyboard inputs already processed through GLFW callback
return 1; // The event was consumed by the callback handler return 1; // The event was consumed by the callback handler
} }
*/ */

+ 8
- 8
src/rcore.c Vedi File

@ -1963,25 +1963,25 @@ bool IsFileExtension(const char *fileName, const char *ext)
if ((fileExt[i] >= 'A') && (fileExt[i] <= 'Z')) fileExtLower[i] = fileExt[i] + 32; if ((fileExt[i] >= 'A') && (fileExt[i] <= 'Z')) fileExtLower[i] = fileExt[i] + 32;
else fileExtLower[i] = fileExt[i]; else fileExtLower[i] = fileExt[i];
} }
int extCount = 1; int extCount = 1;
int extLen = (int)strlen(ext); int extLen = (int)strlen(ext);
char *extList = (char *)RL_CALLOC(extLen + 1, 1); char *extList = (char *)RL_CALLOC(extLen + 1, 1);
char *extListPtrs[MAX_FILE_EXTENSIONS] = { 0 }; char *extListPtrs[MAX_FILE_EXTENSIONS] = { 0 };
strcpy(extList, ext); strcpy(extList, ext);
extListPtrs[0] = extList; extListPtrs[0] = extList;
for (int i = 0; i < extLen; i++)
for (int i = 0; i < extLen; i++)
{ {
// Convert to lower-case if extension is upper-case // Convert to lower-case if extension is upper-case
if ((extList[i] >= 'A') && (extList[i] <= 'Z')) extList[i] += 32; if ((extList[i] >= 'A') && (extList[i] <= 'Z')) extList[i] += 32;
// Get pointer to next extension and add null-terminator // Get pointer to next extension and add null-terminator
if ((extList[i] == ';') && (extCount < (MAX_FILE_EXTENSIONS - 1))) if ((extList[i] == ';') && (extCount < (MAX_FILE_EXTENSIONS - 1)))
{ {
extList[i] = '\0';
extList[i] = '\0';
extListPtrs[extCount] = extList + i + 1; extListPtrs[extCount] = extList + i + 1;
extCount++;
extCount++;
} }
} }
@ -1991,7 +1991,7 @@ bool IsFileExtension(const char *fileName, const char *ext)
// does not start with the '.' // does not start with the '.'
fileExtLowerPtr = fileExtLower; fileExtLowerPtr = fileExtLower;
if (extListPtrs[i][0] != '.') fileExtLowerPtr++; if (extListPtrs[i][0] != '.') fileExtLowerPtr++;
if (strcmp(fileExtLowerPtr, extListPtrs[i]) == 0) if (strcmp(fileExtLowerPtr, extListPtrs[i]) == 0)
{ {
result = true; result = true;
@ -2053,7 +2053,7 @@ int GetFileLength(const char *fileName)
// WARNING: We just get the ptr but not the extension as a separate string // WARNING: We just get the ptr but not the extension as a separate string
const char *GetFileExtension(const char *fileName) const char *GetFileExtension(const char *fileName)
{ {
const char *dot = strrchr(fileName, '.');
const char *dot = strrchr(fileName, '.');
if (!dot || (dot == fileName)) return NULL; if (!dot || (dot == fileName)) return NULL;

+ 1
- 1
src/rlgl.h Vedi File

@ -2573,7 +2573,7 @@ void rlLoadExtensions(void *loader)
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
RLGL.loader = (rlglLoadProc)loader; RLGL.loader = (rlglLoadProc)loader;
// NOTE: Anisotropy levels capability is an extension // NOTE: Anisotropy levels capability is an extension
#ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT #ifndef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF #define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF

Caricamento…
Annulla
Salva