mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2024-11-10 07:11:54 +00:00
apply misc fixes from Markus Fischer and Rambetter
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@329 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
parent
8f437051fa
commit
a54ff4a83e
4 changed files with 22 additions and 8 deletions
|
@ -476,7 +476,7 @@ typedef void* (WINAPI * PFN_QERAPP_GETENTITYHANDLE)(int nIndex);
|
|||
// 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);
|
||||
|
|
|
@ -224,13 +224,18 @@ private:
|
|||
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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3697,9 +3697,13 @@ static void editor_save (GtkWidget *widget, gpointer data)
|
|||
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)
|
||||
|
|
|
@ -3359,6 +3359,9 @@ void CGameInstall::BuildDialog() {
|
|||
|
||||
void CGameInstall::Run() {
|
||||
ScanGames();
|
||||
if (m_availGames[0] == GAME_NONE) {
|
||||
return;
|
||||
}
|
||||
if ( DoModal() == IDCANCEL ) {
|
||||
Sys_Printf( "game dialog cancelled\n" );
|
||||
return;
|
||||
|
@ -3535,5 +3538,7 @@ void CGameInstall::ScanGames() {
|
|||
m_availGames[ iGame++ ] = GAME_JA;
|
||||
}
|
||||
}
|
||||
Sys_Printf("No installable games found in: %s\n",
|
||||
pakPaths.GetBuffer() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue