Skip to content

Conversation

@CarterLi
Copy link
Member

@CarterLi CarterLi commented Sep 10, 2022

SDL is more portable and may work with future windows version.

@LinusDierheimer
Copy link
Collaborator

TBH i'd rather not merge this. I think OpenGL Context creation on MacOS should be done using CGL. It is not only guaranteed to be available (we don't need the whole FF_HAVE_* stuff), but also very simple to set up, according to this SO post.

About the future windows version, i doubt that the future is in the foreseeable time. Fastfetch was designed heavily around the posix API, to the point that there isn't a single file that would already compile on windows. If support for it is needed, we would need to create a whole abstraction layer around things like IO, threading, dynamic library loading, etc.

@CarterLi
Copy link
Member Author

CarterLi commented Sep 11, 2022

Windows does support lots of posix APIs. With _CRT_NONSTDC_NO_WARNINGS pre-defined, open write stat can be used without modifications.

Windows does support ANSI escape code.

Windows (say MinGW-w64) does have a pthread implementation ( performs not very well though ). A better option is to disable multithreading on Windows like what you did on Android and macOS.

There are dlopen like API 3rd party libraries on Windows, and it's trivial to write a LoadLibrary based implementations if you don't want to use them.

Support the common things on Windows is not very hard IMO. The hard parts are still the modules.

@CarterLi
Copy link
Member Author

CarterLi commented Sep 11, 2022

TBH i'd rather not merge this. I think OpenGL Context creation on MacOS should be done using CGL. It is not only guaranteed to be available (we don't need the whole FF_HAVE_* stuff), but also very simple to set up, according to this SO post.

The entire SDL2 part is fully optional. We had EGL, GLX, OSMESA, have another option is not that bad.

I'll investigate CGL next week.

@CarterLi
Copy link
Member Author

I'll remove the SDL part if you insist. This PR also generally simplifies the usage age of library-loading macros. Let me know what you think.

@CarterLi
Copy link
Member Author

SDL code removed

@LinusDierheimer
Copy link
Collaborator

Thanks.

@LinusDierheimer LinusDierheimer merged commit b815464 into fastfetch-cli:master Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants