SDL and SDL_newlib:

- Fixed mouse button handling events. 
- Fixed Makefile
- Delete compile.sh file
 

git-svn-id: svn://kolibrios.org@8648 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2021-03-25 19:14:30 +00:00
parent 4ab1cbe4b1
commit df681ee6ff
4 changed files with 18 additions and 26 deletions

View File

@ -225,16 +225,16 @@ void MenuetOS_PumpEvents(_THIS)
if ((__tmp^oldmousestate)&1) {
if(__tmp&1)
{
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_LMASK,0,0);
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_LEFT,0,0);
} else {
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_LMASK,0,0);
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_LEFT,0,0);
} }
if ((__tmp^oldmousestate)&2) {
if(__tmp&2)
{
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_RMASK,0,0);
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_RIGHT,0,0);
} else {
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_RMASK,0,0);
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_RIGHT,0,0);
} }
oldmousestate = __tmp;
}

View File

@ -1,6 +1,7 @@
CC = kos32-gcc
AR = kos32-ar
LD = kos32-ld
LIBNAME=libSDLn.a
SDK_DIR:= $(abspath ../../..)
@ -39,21 +40,17 @@ CFLAGS = -c -O2 -D_REENTRANT -I../include -I SYSCALL/include -I. -DPACKAGE=\"SDL
-D__KOLIBRIOS__ -DDEBUG_VIDEO -UWIN32 -U_Win32 -U_WIN32 -U__MINGW32__ \
-I../../newlib/libc/include/
all: $(LIBNAME)
LDFLAGS = -shared -s -T../../newlib/libc/app.lds -nostdlib --image-base 0 -L /home/autobuild/tools/win32/mingw32/lib -lgcc -lz -ldll -lc.dll
install: $(LIBNAME)
mv -f $(LIBNAME) $(SDK_DIR)/lib
ARFLAGS = crs
all: libSDL.a
install: libSDL.a
mv -f libSDL.a $(SDK_DIR)/lib
libSDL.a: $(OBJS)
$(AR) $(ARFLAGS) libSDL.a $(OBJS) SYSCALL/src/os.o
$(LIBNAME): $(OBJS)
$(MAKE) -C SYSCALL/src
$(AR) -crs $(LIBNAME) $(OBJS) SYSCALL/src/os.o
%.o : %.asm Makefile
nasm -f coff $< $
nasm -f coff $<
%.o : %.c Makefile
$(CC) $(CFLAGS) -o $@ $<

View File

@ -1,5 +0,0 @@
cd SYSCALL/src
make
cd ../..
make install
make clean

View File

@ -226,16 +226,16 @@ void MenuetOS_PumpEvents(_THIS)
if ((__tmp^oldmousestate)&1) {
if(__tmp&1)
{
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_LMASK,0,0);
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_LEFT,0,0);
} else {
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_LMASK,0,0);
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_LEFT,0,0);
} }
if ((__tmp^oldmousestate)&2) {
if(__tmp&2)
{
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_RMASK,0,0);
SDL_PrivateMouseButton(SDL_PRESSED,SDL_BUTTON_RIGHT,0,0);
} else {
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_RMASK,0,0);
SDL_PrivateMouseButton(SDL_RELEASED,SDL_BUTTON_RIGHT,0,0);
} }
oldmousestate = __tmp;
}