Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions liborbis2d/source/orbis2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <stdlib.h>
#include <sys/param.h>
#include <kernel.h>
#include <types/event.h>
#include <sys/event.h>


#include <gnmdriver.h>
Expand Down Expand Up @@ -172,14 +172,13 @@ void orbis2dStartDrawing()

void orbis2dDrawPixelColor(int x, int y, uint32_t pixelColor)
{
int color;
int pixel = (y * orbconf->pitch) + x;

color=pixelColor;


((uint32_t *)orbconf->surfaceAddr[orbconf->currentBuffer])[pixel]=color;
if((x > -1 && x < ATTR_WIDTH)
&& (y > -1 && y < ATTR_HEIGHT))
{
int pixel = (y * orbconf->pitch) + x;

((uint32_t *)orbconf->surfaceAddr[orbconf->currentBuffer])[pixel] = pixelColor;
}
}
void orbis2dPutImage(uint32_t *buf,int x, int y, int w, int h)
{
Expand Down