Rev 463 | Rev 476 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 463 | Rev 469 | ||
---|---|---|---|
Line 260... | Line 260... | ||
260 | 260 | ||
261 | // We have 3 options: |
261 | // We have 3 options: |
262 | // - The deprecated buffer suite (pb->bufferProcs), works fine |
262 | // - The deprecated buffer suite (pb->bufferProcs), works fine |
263 | // - The recommended buffer suite (kPSBufferSuite), does NOT work (causes memory corruption?) and is not available on some hosts! |
263 | // - The recommended buffer suite (kPSBufferSuite), does NOT work (causes memory corruption?) and is not available on some hosts! |
264 | // Either I do something wrong, or maybe it cannot be used to store data between invocations? |
264 | // Either I do something wrong, or maybe it cannot be used to store data between invocations? |
265 | // - Using malloc(), which works also fine and is more independent from the host and easier |
265 | // - Using malloc(), which works also fine and is more independent from the host. It is also easier. |
266 | *data = (intptr_t)malloc(sizeof(globals_t)); |
266 | *data = (intptr_t)malloc(sizeof(globals_t)); |
267 | if (*data == 0) return; |
267 | if (*data == 0) return; |
268 | gdata = (globals_t*)*data; |
268 | gdata = (globals_t*)*data; |
269 | //#ifdef _WIN32 |
- | |
270 | //gdata->pluginDllSliderMessageId = 0; |
- | |
271 | //#endif |
- | |
272 | //gdata->standalone = gdata->parmloaded = false; // they will be set later |
269 | // Note: gdata->standalone and gdata->parmloaded will be set later |
273 | memset(gdata, 0, sizeof(globals_t)); |
270 | memset(gdata, 0, sizeof(globals_t)); |
274 | } |
271 | } |
275 | else { |
272 | else { |
276 | // We have data from the previous invocation. Use it instead |
273 | // We have data from the previous invocation. Use it instead |
277 | gdata = (globals_t*)*data; |
274 | gdata = (globals_t*)*data; |