You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've seen in different places of OF a define called TARGET_WIN32
like
#if defined(TARGET_WIN32)
is this true for all windows platform, including 64 bits?
should we use it or instead OF_TARGET_WINDOWS or something similar?
or maybe even better, have
to answer the first "direct" question: TARGET_WIN32 is defined in ofConstant.h if #ifdef _WIN32 , and here it stipulates that _WIN32 includes 64 bits.
that being said there is a bit of chaos in ofConstants.h it seems the logic of the definitions is not consistent... there is an effort like your OF_PLATFORM_* idea around TARGET_OF_*, but windows is immediately skipping the rule with TARGET_WIN32. also there is TARGET_OF_IPHONE and TARGET_OF_IOS (Core seems to use only TARGET_OF_IOS but there are some addons that use TARGET_OF_IPHONE).
so to answer the second question it seems the logical thing is to support the effort done in ofConstant to normalize TARGET_OF_*, but maybe fix windows to TARGET_OF_WIN32 (or TARGET_OF_WINDOWS as you suggest it is more inclusive and probably "modern") and make sure all the #ifdefs use the same pattern (while keeping the old TARGET_WIN32 for perennial addon compatibility).
Activity
artificiel commentedon Mar 30, 2023
to answer the first "direct" question:
TARGET_WIN32is defined in ofConstant.h if#ifdef _WIN32, and here it stipulates that_WIN32includes 64 bits.that being said there is a bit of chaos in ofConstants.h it seems the logic of the definitions is not consistent... there is an effort like your
OF_PLATFORM_*idea aroundTARGET_OF_*, but windows is immediately skipping the rule withTARGET_WIN32. also there isTARGET_OF_IPHONEandTARGET_OF_IOS(Core seems to use onlyTARGET_OF_IOSbut there are some addons that useTARGET_OF_IPHONE).so to answer the second question it seems the logical thing is to support the effort done in ofConstant to normalize
TARGET_OF_*, but maybe fix windows toTARGET_OF_WIN32(orTARGET_OF_WINDOWSas you suggest it is more inclusive and probably "modern") and make sure all the #ifdefs use the same pattern (while keeping the oldTARGET_WIN32for perennial addon compatibility).openFrameworks/libs/openFrameworks/utils/ofConstants.h
Lines 88 to 131 in 1e77cec