-
Notifications
You must be signed in to change notification settings - Fork 142
Resolve WinMain linking issues with CMake #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| #ifdef LIBRW_SDL2 | ||
|
|
||
| #ifdef _WIN32 | ||
| #define SDL_MAIN_HANDLED | ||
| #endif | ||
| #include <rw.h> | ||
| #include "skeleton.h" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| #ifdef _WIN32 | ||
| #define SDL_MAIN_HANDLED | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need to add a call to
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just checked the implementation of Other platforms also use it: https://github.com/libsdl-org/SDL/tree/main/src/main
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This only seems to be needed on platforms that define |
||
| #include <windows.h> | ||
| #include <rw.h> | ||
| #include "skeleton.h" | ||
|
|
@@ -291,7 +292,7 @@ SetMousePosition(int x, int y) | |
|
|
||
| #endif | ||
|
|
||
| #ifdef RW_OPENGL | ||
| #if defined(RW_OPENGL) && !defined(__MINGW32__) | ||
| int main(int argc, char *argv[]); | ||
|
|
||
| int WINAPI | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| #include <cstring> | ||
| #include <cassert> | ||
|
|
||
| #define SDL_MAIN_HANDLED | ||
| #include <rw.h> | ||
|
|
||
| using namespace std; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |
| #include <string.h> | ||
| #include <assert.h> | ||
|
|
||
| #define SDL_MAIN_HANDLED | ||
| #include <rw.h> | ||
| #include <args.h> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use the
SDL2mainlibrary, so perhaps all logic related toSDL2maincan be removed from this cmake script?