Mercurial > hg > xmms-sid
comparison src/xs_sidplay.h @ 820:778531e968ed
Clean up tune loading.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 07 Nov 2012 16:08:40 +0200 |
parents | dfda3d47baf7 |
children | ae1f6418d093 |
comparison
equal
deleted
inserted
replaced
819:ab3216b1b582 | 820:778531e968ed |
---|---|
90 /* Updates the information of currently playing tune | 90 /* Updates the information of currently playing tune |
91 */ | 91 */ |
92 gboolean TFUNCTION2(XSEngineState *state) | 92 gboolean TFUNCTION2(XSEngineState *state) |
93 { | 93 { |
94 TTUNEINFO info; | 94 TTUNEINFO info; |
95 TTUNE *tune; | |
96 TENGINE *engine; | 95 TENGINE *engine; |
97 | 96 |
98 /* Check if we have required structures initialized */ | 97 /* Check if we have required structures initialized */ |
99 if (!state || !state->tuneInfo || !state->internal) | 98 if (!state || !state->tuneInfo || !state->internal) |
100 return FALSE; | 99 return FALSE; |
101 | 100 |
102 engine = (TENGINE *) state->internal; | 101 engine = (TENGINE *) state->internal; |
103 tune = engine->tune; | 102 if (!(engine->tune)) |
104 if (!tune) | |
105 return FALSE; | 103 return FALSE; |
106 | 104 |
107 /* Get currently playing tune information */ | 105 /* Get currently playing tune information */ |
108 #ifdef XS_SIDPLAY1_H | 106 #ifdef XS_SIDPLAY1_H |
109 tune->getInfo(info); | 107 engine->tune->getInfo(info); |
110 #endif | 108 #endif |
111 #ifdef XS_SIDPLAY2_H | 109 #ifdef XS_SIDPLAY2_H |
112 info = tune->getInfo(); | 110 info = engine->tune.getInfo(); |
113 #endif | 111 #endif |
114 | 112 |
115 /* NOTICE! Here we assume that libSIDPlay[12] headers define | 113 /* NOTICE! Here we assume that libSIDPlay[12] headers define |
116 * SIDTUNE_SIDMODEL_* similarly to our enums in xs_config.h ... | 114 * SIDTUNE_SIDMODEL_* similarly to our enums in xs_config.h ... |
117 */ | 115 */ |