Skip to content

Commit

Permalink
update clipboard format check
Browse files Browse the repository at this point in the history
  • Loading branch information
ColleagueRiley committed Sep 8, 2024
1 parent 564c64f commit fb46099
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
17 changes: 3 additions & 14 deletions RGFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -3450,7 +3450,7 @@ Start of Linux / Unix defines
*size = sizeN;

return s;
}
}

/*
almost all of this function is sourced from GLFW
Expand Down Expand Up @@ -3490,9 +3490,6 @@ Start of Linux / Unix defines
XEvent reply = { SelectionNotify };
reply.xselection.property = 0;

const Atom formats[] = { UTF8_STRING, XA_STRING };
const i32 formatCount = sizeof(formats) / sizeof(formats[0]);

if (request->target == TARGETS) {
const Atom targets[] = { TARGETS,
MULTIPLE,
Expand Down Expand Up @@ -3522,15 +3519,7 @@ Start of Linux / Unix defines

unsigned long i;
for (i = 0; i < (u32)count; i += 2) {
i32 j;

for (j = 0; j < formatCount; j++) {
if (targets[i] == formats[j])
break;
}

if (j < formatCount)
{
if (targets[i] == UTF8_STRING || targets[i] == XA_STRING) {
XChangeProperty((Display*) RGFW_root->src.display,
request->requestor,
targets[i + 1],
Expand Down Expand Up @@ -8502,7 +8491,7 @@ RGFW_window* RGFW_createWindow(const char* name, RGFW_rect rect, u16 args) {
emscripten_webgl_make_context_current(win->src.ctx);

#ifdef LEGACY_GL_EMULATION
EM_ASM("Module.useWebGL = true; GLImmediate.init();");
//EM_ASM("GLImmediate.init();");
#endif

emscripten_set_canvas_element_size("#canvas", rect.w, rect.h);
Expand Down
4 changes: 0 additions & 4 deletions examples/basic/basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ int main(void) {

unsigned char i;

#ifndef RGFW_VULKAN
glEnable(GL_BLEND);
#endif

glEnable(GL_BLEND);
glClearColor(0, 0, 0, 0);

Expand Down

0 comments on commit fb46099

Please sign in to comment.