Project

General

Profile

Revision 152

added files, and makefiles

View differences:

proj.c
36 36

  
37 37
int(proj_main_loop)(int argc, char *argv[]) {
38 38

  
39
    if (vbe_get_mode_information(INDEXED_1024_768)) {
40
        printf("%s: failed to get information for mode %x.\n", __func__, INDEXED_1024_768);
41
        if (vg_exit())
42
            printf("%s: vg_exit failed to exit to text mode.\n", __func__);
43
        return 1;
44
    }
45

  
46
    map_vram(); // if function fails it aborts program
47

  
48
    if (set_graphics_mode(INDEXED_1024_768)) {
49
        printf("%s: failed to set graphic mode %x.\n", __func__, INDEXED_1024_768);
50
        if (vg_exit()) printf("%s: vg_exit failed to exit to text mode.\n", __func__);
51
        if (free_memory_map()) {
52
            printf("%s: lm_free failed\n", __func__);
53
        }
54
        return 1;
55
    };
56

  
57

  
39 58
    /// loop stuff
40 59
    int ipc_status, r;
41 60
    message msg;
......
117 136
    if (sys_irqenable(&mouse_id)) return 1; // re-enables our interrupts notifications
118 137
    if (unsubscribe_interrupt(&mouse_id)) return 1; // unsubscribes interrupts
119 138

  
139
    
140
    if (vg_exit()) {
141
        printf("%s: vg_exit failed to exit to text mode.\n", __func__);
142
        if (free_memory_map()) printf("%s: lm_free failed\n", __func__);
143
        return 1;
144
    }
145

  
146
    if (free_memory_map()) {
147
        printf("%s: lm_free failed\n", __func__);
148
        return 1;
149
    }
150

  
151
    
152
    #ifdef DIOGO
153
        hello
154
    #endif
155

  
156

  
120 157
    return 0;
158

  
159
    return 0;
121 160
}

Also available in: Unified diff