Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ int handleMessage(struct message*);
// gui.c
extern ushort SCREEN_WIDTH;
extern ushort SCREEN_HEIGHT;
extern int screen_size;
extern struct RGB* screen;
extern struct RGB* screen_buf1;
extern struct RGB* screen_buf2;
Expand Down
6 changes: 3 additions & 3 deletions gui_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#ifndef __GUI_BASE_H__
#define __GUI_BASE_H__

ushort SCREEN_WIDTH;
ushort SCREEN_HEIGHT;
int screen_size;
//ushort SCREEN_WIDTH;
//ushort SCREEN_HEIGHT;
//int screen_size;

// 24 bit RGB. used in GUI Utility
typedef struct RGB {
Expand Down
2 changes: 1 addition & 1 deletion mkfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "stat.h"
#include "param.h"

#define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0)
//#define static_assert(a, b) do { switch (0) case 0: case (a): ; } while (0)

int nblocks = (20446-LOGSIZE);
int nlog = LOGSIZE;
Expand Down
10 changes: 7 additions & 3 deletions window_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

#include "window_manager.h"

inline int min(int x, int y) { return x < y ? x : y; }
inline int max(int x, int y) { return x > y ? x : y; }
inline int clamp(int x, int l, int r) { return min(r, max(l, x)); }
/*inline*/ int min(int x, int y) { return x < y ? x : y; }
/*inline*/ int max(int x, int y) { return x > y ? x : y; }
/*inline*/ int clamp(int x, int l, int r) { return min(r, max(l, x)); }

ushort SCREEN_WIDTH;
ushort SCREEN_HEIGHT;
int screen_size;

int isInRect(win_rect *rect, int x, int y)
{
Expand Down