Project

General

Profile

Revision 173

fixed crosshair

View differences:

graph.c
212 212

  
213 213
int (graph_set_pixel)(uint16_t x, uint16_t y, uint32_t color) {
214 214
    if (x >= vbe_mem_info.XResolution || y >= vbe_mem_info.YResolution) {
215
        printf("%s: invalid pixel.\n", __func__);
215
        //printf("%s: invalid pixel.\n", __func__);
216 216
        return OUT_OF_RANGE;
217 217
    }
218 218
    unsigned int pos = (x + y * vbe_mem_info.XResolution) * graph_get_bytes_pixel();
......
220 220
    return SUCCESS;
221 221
}
222 222
int (graph_set_pixel_alpha)(uint16_t x, uint16_t y, uint32_t color, uint8_t alpha){
223
    if (x >= vbe_mem_info.XResolution || y >= vbe_mem_info.YResolution) {
224
        //printf("%s: invalid pixel.\n", __func__);
225
        return OUT_OF_RANGE;
226
    }
223 227
    unsigned int pos = (x + y * vbe_mem_info.XResolution) * graph_get_bytes_pixel();
224 228
    uint32_t color_;
225 229
    memcpy(&color_, video_buf + pos, graph_get_bytes_pixel());

Also available in: Unified diff