简体   繁体   English

如何获取 SDL_CreateWindow 定义

[英]How to get SDL_CreateWindow definition

I was trying to learn SDL2 and was trying to figure out how SDL_CreateWindow was implemented.我试图学习 SDL2 并试图弄清楚 SDL_CreateWindow 是如何实现的。 All I could find out was this我能找到的就是这个

extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
                                                      int x, int y, int w,
                                                      int h, Uint32 flags);

and a #define in the code和代码中的#define

#define SDL_CreateWindow SDL_CreateWindow_REAL

Is it loaded via a dll or something?它是通过 dll 还是其他方式加载的? Is there a way I can see the definition?有没有办法让我看到定义?

I tried looking around the SDL.sln but didnt get any good matches.我试着环顾 SDL.sln 但没有找到任何好的匹配项。

Those *_REAL -suffixed names are an artifact of SDL's dynapi system that lets end-users update the SDL version of programs that statically link against it.那些*_REAL后缀的名称是 SDL 的dynapi 系统的产物,它允许最终用户更新静态链接到它的程序的 SDL 版本。

git grep -ing the source for SDL_CreateWindowTexture should lead you to the actual implementation at src/video/SDL_video.c:221 git grep -ing SDL_CreateWindowTexture的源代码应该会引导您在src/video/SDL_video.c:221处进行实际实现

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM