this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Adding GPU_GetVirtualResolution

This fixes Issue #11

+31
+3
include/SDL_gpu.h
··· 869 869 /*! Change the logical size of the given target. Rendering to this target will be scaled as if the dimensions were actually the ones given. */ 870 870 DECLSPEC void SDLCALL GPU_SetVirtualResolution(GPU_Target* target, Uint16 w, Uint16 h); 871 871 872 + /*! Query the logical size of the given target. */ 873 + DECLSPEC void SDLCALL GPU_GetVirtualResolution(GPU_Target* target, Uint16* w, Uint16* h); 874 + 872 875 /*! Converts screen space coordinates (such as from mouse input) to logical drawing coordinates. */ 873 876 DECLSPEC void SDLCALL GPU_GetVirtualCoords(GPU_Target* target, float* x, float* y, float displayX, float displayY); 874 877
+3
include/SDL_gpu_RendererImpl.h
··· 43 43 /*! \see GPU_SetVirtualResolution() */ 44 44 void (SDLCALL *SetVirtualResolution)(GPU_Renderer* renderer, GPU_Target* target, Uint16 w, Uint16 h); 45 45 46 + /*! \see GPU_GetVirtualResolution() */ 47 + void (SDLCALL *GetVirtualResolution)(GPU_Target* target, Uint16* w, Uint16* h); 48 + 46 49 /*! \see GPU_UnsetVirtualResolution() */ 47 50 void (SDLCALL *UnsetVirtualResolution)(GPU_Renderer* renderer, GPU_Target* target); 48 51
+8
src/SDL_gpu.c
··· 537 537 } 538 538 539 539 540 + void GPU_GetVirtualResolution(GPU_Target* target, Uint16* w, Uint16* h) 541 + { 542 + if (target == NULL) 543 + RETURN_ERROR(GPU_ERROR_USER_ERROR, "NULL target"); 544 + 545 + _gpu_current_renderer->impl->GetVirtualResolution(target, w, h); 546 + } 547 + 540 548 void GPU_SetVirtualResolution(GPU_Target* target, Uint16 w, Uint16 h) 541 549 { 542 550 if(!CHECK_RENDERER)
+17
src/renderer_GL_common.inl
··· 31 31 #endif 32 32 #endif 33 33 34 + #if defined ( WIN32 ) 35 + #define __func__ __FUNCTION__ 36 + #endif 37 + 34 38 // Visual C does not support C99 (which includes a safe snprintf) 35 39 #ifdef _MSC_VER 36 40 #define snprintf c99_snprintf ··· 1682 1686 applyTargetCamera(target); 1683 1687 1684 1688 return 1; 1689 + } 1690 + 1691 + static void GetVirtualResolution(GPU_Target* target, Uint16* w, Uint16* h) 1692 + { 1693 + if (target == NULL) 1694 + { 1695 + *w = 0; 1696 + *h = 0; 1697 + } 1698 + else { 1699 + *w = target->w; 1700 + *h = target->h; 1701 + } 1685 1702 } 1686 1703 1687 1704 static void SetVirtualResolution(GPU_Renderer* renderer, GPU_Target* target, Uint16 w, Uint16 h)