mirror of
				https://github.com/Ryujinx/SDL.git
				synced 2025-11-04 14:24:53 +00:00 
			
		
		
		
	Wayland: Fixed missing error message if creating a custom cursor failed.
SDL_GetError() returned no error message because it was written to stderr only.
This commit is contained in:
		
							parent
							
								
									9011eb1c41
								
							
						
					
					
						commit
						a9edc5137e
					
				| 
						 | 
					@ -116,8 +116,7 @@ create_buffer_from_shm(Wayland_CursorData *d,
 | 
				
			||||||
    shm_fd = wayland_create_tmp_file(size);
 | 
					    shm_fd = wayland_create_tmp_file(size);
 | 
				
			||||||
    if (shm_fd < 0)
 | 
					    if (shm_fd < 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        fprintf(stderr, "creating mouse cursor buffer failed!\n");
 | 
					        return SDL_SetError("Creating mouse cursor buffer failed.");
 | 
				
			||||||
        return -1;
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    d->shm_data = mmap(NULL,
 | 
					    d->shm_data = mmap(NULL,
 | 
				
			||||||
| 
						 | 
					@ -128,9 +127,8 @@ create_buffer_from_shm(Wayland_CursorData *d,
 | 
				
			||||||
                       0);
 | 
					                       0);
 | 
				
			||||||
    if (d->shm_data == MAP_FAILED) {
 | 
					    if (d->shm_data == MAP_FAILED) {
 | 
				
			||||||
        d->shm_data = NULL;
 | 
					        d->shm_data = NULL;
 | 
				
			||||||
        fprintf (stderr, "mmap () failed\n");
 | 
					 | 
				
			||||||
        close (shm_fd);
 | 
					        close (shm_fd);
 | 
				
			||||||
        return -1;
 | 
					        return SDL_SetError("mmap() failed.");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
 | 
					    shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue