early-access version 2847

This commit is contained in:
pineappleEA
2022-07-19 05:48:31 +02:00
parent ba74a2373c
commit 05e3c38e7f
498 changed files with 16027 additions and 27028 deletions
+20 -31
View File
@@ -21,7 +21,6 @@
#ifndef SDL_BAPP_H
#define SDL_BAPP_H
#include <Path.h>
#include <InterfaceKit.h>
#include <LocaleRoster.h>
#if SDL_VIDEO_OPENGL
@@ -94,15 +93,6 @@ public:
}
virtual void RefsReceived(BMessage* message) {
char filePath[512];
entry_ref entryRef;
for (int32 i = 0; message->FindRef("refs", i, &entryRef) == B_OK; i++) {
BPath referencePath = BPath(&entryRef);
SDL_SendDropFile(NULL, referencePath.Path());
}
return;
}
/* Event-handling functions */
virtual void MessageReceived(BMessage* message) {
@@ -208,10 +198,6 @@ public:
}
#if SDL_VIDEO_OPENGL
BGLView *GetCurrentContext() {
return _current_context;
}
void SetCurrentContext(BGLView *newContext) {
if(_current_context)
_current_context->UnlockGL();
@@ -248,22 +234,25 @@ private:
}
win = GetSDLWindow(winID);
// Simple relative mode support for mouse.
if (SDL_GetMouse()->relative_mode) {
int winWidth, winHeight, winPosX, winPosY;
SDL_GetWindowSize(win, &winWidth, &winHeight);
SDL_GetWindowPosition(win, &winPosX, &winPosY);
int dx = x - (winWidth / 2);
int dy = y - (winHeight / 2);
SDL_SendMouseMotion(win, 0, SDL_GetMouse()->relative_mode, dx, dy);
set_mouse_position((winPosX + winWidth / 2), (winPosY + winHeight / 2));
if (!be_app->IsCursorHidden())
be_app->HideCursor();
} else {
SDL_SendMouseMotion(win, 0, 0, x, y);
if (SDL_ShowCursor(-1) && be_app->IsCursorHidden())
be_app->ShowCursor();
}
// Simple relative mode support for mouse.
if (SDL_GetMouse()->relative_mode) {
int winWidth, winHeight, winPosX, winPosY;
SDL_GetWindowSize(win, &winWidth, &winHeight);
SDL_GetWindowPosition(win, &winPosX, &winPosY);
int dx = x - (winWidth / 2);
int dy = y - (winHeight / 2);
SDL_SendMouseMotion(win, 0, SDL_GetMouse()->relative_mode, dx, dy);
set_mouse_position((winPosX + winWidth / 2), (winPosY + winHeight / 2));
if (!be_app->IsCursorHidden())
be_app->HideCursor();
} else {
SDL_SendMouseMotion(win, 0, 0, x, y);
if (SDL_ShowCursor(-1) && be_app->IsCursorHidden())
be_app->ShowCursor();
}
/* Tell the application that the mouse passed over, redraw needed */
HAIKU_UpdateWindowFramebuffer(NULL,win,NULL,-1);
}
void _HandleMouseButton(BMessage *msg) {
@@ -311,7 +300,7 @@ private:
}
HAIKU_SetKeyState(scancode, state);
SDL_SendKeyboardKey(state, HAIKU_GetScancodeFromBeKey(scancode));
if (state == SDL_PRESSED && SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) {
const int8 *keyUtf8;
ssize_t count;
+1
View File
@@ -1,6 +1,7 @@
/*
SDL_uikit_main.c, placed in the public domain by Sam Lantinga 3/18/2019
*/
#include "../../SDL_internal.h"
/* Include the SDL main definition header */
#include "SDL_main.h"
+1 -1
View File
@@ -70,7 +70,7 @@ main_getcmdline(void)
if (!argv[i]) {
return OutOfMemory();
}
SDL_memcpy(argv[i], arg, len);
CopyMemory(argv[i], arg, len);
SDL_free(arg);
}
argv[i] = NULL;
+4 -4
View File
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,23,1,0
PRODUCTVERSION 2,23,1,0
FILEVERSION 2,0,20,0
PRODUCTVERSION 2,0,20,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
@@ -23,12 +23,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL\0"
VALUE "FileVersion", "2, 23, 1, 0\0"
VALUE "FileVersion", "2, 0, 20, 0\0"
VALUE "InternalName", "SDL\0"
VALUE "LegalCopyright", "Copyright (C) 2022 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL2.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
VALUE "ProductVersion", "2, 23, 1, 0\0"
VALUE "ProductVersion", "2, 0, 20, 0\0"
END
END
BLOCK "VarFileInfo"