Skip to content

Commit

Permalink
Add isWindows helper function.
Browse files Browse the repository at this point in the history
  • Loading branch information
wengxt committed Feb 2, 2025
1 parent 5fc9f17 commit f73b131
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/fcitx-utils/misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,19 @@ FCITXUTILS_EXPORT constexpr inline bool isEmscripten() {
#endif
}

/**
* Util function that returns whether it is compile against emscripten.
*
* @since 5.1.13
*/
FCITXUTILS_EXPORT constexpr inline bool isWindows() {
#if defined(_WIN32)
return true;
#else
return false;
#endif
}

} // namespace fcitx

#endif // _FCITX_UTILS_MISC_H_

0 comments on commit f73b131

Please sign in to comment.