final touches

This commit is contained in:
Luxdragon 2024-01-20 19:43:16 +01:00
parent 71cab2023e
commit b7f454652e

View file

@ -1,7 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h> // for the uintx_t's
#include <unistd.h> // for sleep
#include <stdint.h> // for the uint8_t's
#include <gtk/gtk.h>
#include <pthread.h>
@ -1565,7 +1564,6 @@ void read_Space_Invaders_ROM(State8080* state, const char* filename, int offset)
}
typedef struct cpu_data {
char done;
int total_cycles_count;
GtkWidget* drawing_area;
State8080 *state;
@ -1575,7 +1573,7 @@ typedef struct cpu_data {
void *cpu(void* arg) {
cpu_data *cpu = (cpu_data*) arg;
char done = cpu->done;
char done = 0;
State8080* state = cpu->state;
int counter;
@ -1784,7 +1782,6 @@ int main (int argc, char *argv[]) {
cpu_data *cpu_eco = malloc(sizeof(cpu_data));
cpu_eco->state = state;
cpu_eco->drawing_area = drawing_area;
cpu_eco->done = 0;
cpu_eco->total_cycles_count = 0;
// Pthread
@ -1795,10 +1792,5 @@ int main (int argc, char *argv[]) {
// Main GTK Loop
g_timeout_add(50, update_ui, drawing_area);
gtk_main();
// cpu_eco->done = 1;
// pthread_join(pid, NULL);
// free(state->memory);
// free(state);
// free(cpu_eco);
return 0;
}