// but you don't have a clean epair read/write query
// and you rely on the C structs directly, which might go away soon
// ok now, stop using, it's bad for your karma (see iepairs.h instead)
-typedef epair_t* (WINAPI * PFN_QERAPP_ALLOCATEEPAIR)( char*, char* );
+typedef epair_t* (WINAPI * PFN_QERAPP_ALLOCATEEPAIR)( const char*, const char* );
typedef int (WINAPI * PFN_QERAPP_ALLOCATEENTITYBRUSHHANDLES)(void* vp);
typedef void (WINAPI * PFN_QERAPP_RELEASEENTITYBRUSHHANDLES)();
typedef void* (WINAPI * PFN_QERAPP_GETENTITYBRUSHHANDLE)(int nIndex);
const char* surfShaderName = m_model->GetShaderNameForSurface(j);
IShader* shader = shader_for_remap(surfShaderName);
// m_shaders.push_back((shader) ? shader : (global_shader) ? global_shader : QERApp_Shader_ForName(surfShaderName));
- if( shader ) {
- m_shaders.push_back(shader);
- } else if( global_shader ) {
- m_shaders.push_back(global_shader);
- } else {
- m_shaders.push_back(QERApp_Shader_ForName(surfShaderName));
+ // Determine which shader it is going to be
+ if( !shader ) {
+ if( global_shader ) {
+ shader = global_shader;
+ } else {
+ shader = QERApp_Shader_ForName(surfShaderName);
+ }
}
+ // Add reference
+ shader->IncRef();
+ // Done, continue
+ m_shaders.push_back( shader );
}
}
return;
}
- char *str = gtk_editable_get_chars (GTK_EDITABLE (text), 0, -1);
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text));
+ GtkTextIter start, end;
+ gtk_text_buffer_get_bounds ( buffer, &start, &end);
+ char *str = gtk_text_buffer_get_text(buffer, &start, &end, FALSE);
fwrite (str, 1, strlen (str), f);
fclose (f);
+ g_free(str);
}
static void editor_close (GtkWidget *widget, gpointer data)
void CGameInstall::Run() {
ScanGames();
+ if (m_availGames[0] == GAME_NONE) {
+ return;
+ }
if ( DoModal() == IDCANCEL ) {
Sys_Printf( "game dialog cancelled\n" );
return;
m_availGames[ iGame++ ] = GAME_JA;
}
}
+ Sys_Printf("No installable games found in: %s\n",
+ pakPaths.GetBuffer() );
}