Skip to content

Commit

Permalink
Fixed gtk port compilation
Browse files Browse the repository at this point in the history
Fixes #411
  • Loading branch information
Guillaumito committed Jul 7, 2018
1 parent 06a816c commit 7e38821
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions yabause/src/gtk/yuivdp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ GtkWidget * yui_vdp1_new(YuiWindow * y) {

void yui_vdp1_fill(YuiVdp1 * vdp1) {
gint j;
gchar * string;
gchar string[256];
gchar nameTemp[1024];
GtkTreeIter iter;

yui_vdp1_clear(vdp1);

j = 0;

string = Vdp1DebugGetCommandNumberName(j);
while(string && (j < MAX_VDP1_COMMAND)) {
Vdp1DebugGetCommandNumberName(j, string);
while((string[0] != '\0') && (j < MAX_VDP1_COMMAND)) {
gtk_list_store_append(vdp1->store, &iter);
gtk_list_store_set(vdp1->store, &iter, 0, string, -1);

Expand Down Expand Up @@ -215,7 +215,7 @@ void yui_vdp1_fill(YuiVdp1 * vdp1) {
}

j++;
string = Vdp1DebugGetCommandNumberName(j);
Vdp1DebugGetCommandNumberName(j, string);
}

Vdp1DebugCommand(vdp1->cursor, nameTemp);
Expand Down Expand Up @@ -254,7 +254,12 @@ static void yui_vdp1_view_cursor_changed(GtkWidget * view, YuiVdp1 * vdp1) {

void yui_vdp1_update(YuiVdp1 * vdp1) {
gint i;
for(i = 0 ; i < MAX_VDP1_COMMAND ; i++ ) if ( !Vdp1DebugGetCommandNumberName(i)) break;
gchar string[256];

for(i = 0 ; i < MAX_VDP1_COMMAND ; i++ ) {
Vdp1DebugGetCommandNumberName(i, string);
if ( string[0] == '\0') break;
}
vdp1->cursor = 0;
yui_vdp1_fill(vdp1);
}
Expand Down

0 comments on commit 7e38821

Please sign in to comment.