Browse Source

Fixed Android build warnings

Sam Lantinga 9 months ago
parent
commit
c6b9b08e9f

+ 7 - 7
src/render/SDL_d3dmath.h

@@ -65,13 +65,13 @@ typedef struct
     };
 } Float4X4;
 
-Float4X4 MatrixIdentity();
-Float4X4 MatrixMultiply(Float4X4 M1, Float4X4 M2);
-Float4X4 MatrixScaling(float x, float y, float z);
-Float4X4 MatrixTranslation(float x, float y, float z);
-Float4X4 MatrixRotationX(float r);
-Float4X4 MatrixRotationY(float r);
-Float4X4 MatrixRotationZ(float r);
+extern Float4X4 MatrixIdentity(void);
+extern Float4X4 MatrixMultiply(Float4X4 M1, Float4X4 M2);
+extern Float4X4 MatrixScaling(float x, float y, float z);
+extern Float4X4 MatrixTranslation(float x, float y, float z);
+extern Float4X4 MatrixRotationX(float r);
+extern Float4X4 MatrixRotationY(float r);
+extern Float4X4 MatrixRotationZ(float r);
 
 /* Ends C function definitions when using C++ */
 #ifdef __cplusplus

+ 2 - 2
src/render/vulkan/SDL_render_vulkan.c

@@ -2939,7 +2939,7 @@ static int VULKAN_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
      * then return:
      */
     *pixels = textureData->stagingBuffer.mappedBufferPtr;
-    *pitch = length;
+    *pitch = (int)length;
     return 0;
 
 }
@@ -3892,7 +3892,7 @@ static SDL_Surface* VULKAN_RenderReadPixels(SDL_Renderer *renderer, const SDL_Re
         VULKAN_VkFormatToSDLPixelFormat(vkFormat),
         renderer->target ? renderer->target->colorspace : renderer->output_colorspace,
         readbackBuffer.mappedBufferPtr,
-        length);
+        (int)length);
 
     VULKAN_DestroyBuffer(rendererData, &readbackBuffer);
 

+ 1 - 1
src/render/vulkan/VULKAN_PixelShader_Advanced.h

@@ -1,6 +1,6 @@
 	// 1113.1.1
 	 #pragma once
-const uint32_t VULKAN_PixelShader_Advanced[] = {
+static const uint32_t VULKAN_PixelShader_Advanced[] = {
 	0x07230203,0x00010000,0x0008000b,0x0000043e,0x00000000,0x00020011,0x00000001,0x0006000b,
 	0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
 	0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x000001bb,0x000001be,0x000001c2,

+ 1 - 1
src/render/vulkan/VULKAN_PixelShader_Colors.h

@@ -1,6 +1,6 @@
 	// 1113.1.1
 	 #pragma once
-const uint32_t VULKAN_PixelShader_Colors[] = {
+static const uint32_t VULKAN_PixelShader_Colors[] = {
 	0x07230203,0x00010000,0x0008000b,0x000000a1,0x00000000,0x00020011,0x00000001,0x0006000b,
 	0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
 	0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000048,0x0000004c,0x00030010,

+ 1 - 1
src/render/vulkan/VULKAN_PixelShader_Textures.h

@@ -1,6 +1,6 @@
 	// 1113.1.1
 	 #pragma once
-const uint32_t VULKAN_PixelShader_Textures[] = {
+static const uint32_t VULKAN_PixelShader_Textures[] = {
 	0x07230203,0x00010000,0x0008000b,0x000000a8,0x00000000,0x00020011,0x00000001,0x0006000b,
 	0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
 	0x0008000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x0000004b,0x0000004e,0x00000052,

+ 1 - 1
src/render/vulkan/VULKAN_VertexShader.h

@@ -1,6 +1,6 @@
 	// 1113.1.1
 	 #pragma once
-const uint32_t VULKAN_VertexShader[] = {
+static const uint32_t VULKAN_VertexShader[] = {
 	0x07230203,0x00010000,0x0008000b,0x000000af,0x00000000,0x00020011,0x00000001,0x0006000b,
 	0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
 	0x000c000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000003f,0x00000043,0x00000047,