Fixing GLX screen destroying sequence, changing companion package name.

This commit is contained in:
Twaik Yont 2023-06-05 15:33:49 +03:00
parent be324728ea
commit e5ca171126
5 changed files with 872 additions and 846 deletions

View File

@ -56,8 +56,7 @@ set(test_compile_options
"-Werror=address"
"-Werror=int-to-pointer-cast"
"-Werror=pointer-to-int-cast"
"-fno-strict-aliasing"
"-fsanitize=address")
"-fno-strict-aliasing")
set(CMAKE_REQUIRED_QUIET_OLD ${CMAKE_REQUIRED_QUIET})
set(CMAKE_REQUIRED_QUIET 1)

View File

@ -104,6 +104,7 @@ static void VoidNoop() {}
void
ddxGiveUp(unused enum ExitCode error) {
__android_log_print(ANDROID_LOG_ERROR, "Xlorie", "Server stopped");
((void(*)(void))0)();
exit(0);
}

File diff suppressed because it is too large Load Diff

View File

@ -55,11 +55,33 @@ static __GLXdrawable * createDrawable(unused ClientPtr client, __GLXscreen * scr
return private;
}
static void glXDRIscreenDestroy(__GLXscreen * baseScreen) {
static void glXDRIscreenDestroy(__GLXscreen *baseScreen) {
__glXScreenDestroy(baseScreen);
free(baseScreen);
}
/* According to __glXScreenDestroy's code all configs
* are freed with separate `free` call for each config so
* this way we are cloning configs.
*/
static __GLXconfig* generateConfigs(void) {
__GLXconfig *first, *current, *last;
first = malloc(sizeof(__GLXconfig));
*first = configs[0];
last = first;
for (int i=1; i< ARRAY_SIZE(configs); i++) {
current = malloc(sizeof(__GLXconfig));
*current = configs[i];
last->next = current;
last = current;
}
return first;
}
static __GLXscreen *glXDRIscreenProbe(ScreenPtr pScreen) {
__GLXscreen *screen;
@ -70,7 +92,7 @@ static __GLXscreen *glXDRIscreenProbe(ScreenPtr pScreen) {
screen->destroy = glXDRIscreenDestroy;
screen->createDrawable = createDrawable;
screen->pScreen = pScreen;
screen->fbconfigs = configs;
screen->fbconfigs = generateConfigs();
screen->glvnd = strdup("mesa");
__glXInitExtensionEnableBits(screen->glx_enable_bits);

View File

@ -2,7 +2,7 @@
set -e
cd "$(dirname "$0")"
TERMUX_PKG_NAME="termux-x11"
TERMUX_PKG_NAME="termux-x11-nightly"
TERMUX_PKG_HOMEPAGE="https://github.com/termux/termux-x11"
TERMUX_PKG_DESCRIPTION="Companion package for termux-x11 app"
TERMUX_PKG_MAINTAINER="Twaik Yont @twaik"