History

added comments; moved ptr init to cpp for back compat

Ge Wang committed 6 years ago

Commit 291e3d21 parent 5e02dfc2 files · +13 −6Browse files

Showing the changes to src/core/chuck.cpp (1 of 2 files). Show all

Unified · Split

src/core/chuck.cpp+9−2
@@ -128,6 +128,8 @@ ChucK::ChucK() · 127 unmodified lines
128 initDefaultParams();128 initDefaultParams();
129 // did user init?129 // did user init?
130 m_init = FALSE;130 m_init = FALSE;
131 // zero out the hook
132 m_hook = NULL; // m_hook = nullptr
131 133
132 // global init, if needed134 // global init, if needed
133 if( !o_isGlobalInit ) globalInit();135 if( !o_isGlobalInit ) globalInit();
@@ -1129,9 +1131,11 @@ void ChucK::poop() · 995 unmodified lines
1129 1131
1130 1132
1131 1133
1134
1132//-----------------------------------------------------------------------------1135//-----------------------------------------------------------------------------
1133// name: setMainThreadHook()1136// name: setMainThreadHook()
1134// desc:1137// desc: set a function pointer to call from the main thread loop
1138// e.g., for graphics, MAUI, potentially from a chug-in
1135//-----------------------------------------------------------------------------1139//-----------------------------------------------------------------------------
1136bool ChucK::setMainThreadHook(Chuck_DL_MainThreadHook * hook)1140bool ChucK::setMainThreadHook(Chuck_DL_MainThreadHook * hook)
1137{1141{
@@ -1139,9 +1143,12 @@ bool ChucK::setMainThreadHook(Chuck_DL_MainThreadHook * hook) · 1 unmodified line
1139 return true;1143 return true;
1140}1144}
1141 1145
1146
1147
1148
1142//-----------------------------------------------------------------------------1149//-----------------------------------------------------------------------------
1143// name: getMainThreadHook()1150// name: getMainThreadHook()
1144// desc:1151// desc: get pointer to current function to be called from main loop
1145//-----------------------------------------------------------------------------1152//-----------------------------------------------------------------------------
1146Chuck_DL_MainThreadHook * ChucK::getMainThreadHook()1153Chuck_DL_MainThreadHook * ChucK::getMainThreadHook()
1147{1154{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t