Remove references to old name
This commit is contained in:
parent
5bf161e744
commit
dc23f29915
3 changed files with 13 additions and 9 deletions
|
@ -2,14 +2,14 @@
|
|||
#include <wlr/backend.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
|
||||
struct wlr_backend *zag_wlr_backend_autocreate(struct wl_display *display) {
|
||||
struct wlr_backend *river_wlr_backend_autocreate(struct wl_display *display) {
|
||||
return wlr_backend_autocreate(display, NULL);
|
||||
}
|
||||
|
||||
struct wlr_renderer *zag_wlr_backend_get_renderer(struct wlr_backend *backend) {
|
||||
struct wlr_renderer *river_wlr_backend_get_renderer(struct wlr_backend *backend) {
|
||||
return wlr_backend_get_renderer(backend);
|
||||
}
|
||||
|
||||
bool zag_wlr_backend_start(struct wlr_backend *backend) {
|
||||
bool river_wlr_backend_start(struct wlr_backend *backend) {
|
||||
return wlr_backend_start(backend);
|
||||
}
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
#define ZAG_RENDER_H
|
||||
|
||||
#include <wlr/backend/session.h>
|
||||
/*
|
||||
* This header is needed since zig cannot yet translate flexible arrays.
|
||||
* See https://github.com/ziglang/zig/issues/4775
|
||||
*/
|
||||
|
||||
struct wlr_backend_impl;
|
||||
|
||||
|
@ -18,9 +22,9 @@ struct wlr_backend {
|
|||
} events;
|
||||
};
|
||||
|
||||
struct wlr_backend *zag_wlr_backend_autocreate(struct wl_display *display);
|
||||
struct wlr_renderer *zag_wlr_backend_get_renderer(struct wlr_backend *backend);
|
||||
bool zag_wlr_backend_start(struct wlr_backend *backend);
|
||||
struct wlr_backend *river_wlr_backend_autocreate(struct wl_display *display);
|
||||
struct wlr_renderer *river_wlr_backend_get_renderer(struct wlr_backend *backend);
|
||||
bool river_wlr_backend_start(struct wlr_backend *backend);
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -39,13 +39,13 @@ pub const Server = struct {
|
|||
// a tty or wayland if WAYLAND_DISPLAY is set.
|
||||
//
|
||||
// This frees itself.when the wl_display is destroyed.
|
||||
self.wlr_backend = c.zag_wlr_backend_autocreate(self.wl_display) orelse
|
||||
self.wlr_backend = c.river_wlr_backend_autocreate(self.wl_display) orelse
|
||||
return error.CantCreateWlrBackend;
|
||||
|
||||
// If we don't provide a renderer, autocreate makes a GLES2 renderer for us.
|
||||
// The renderer is responsible for defining the various pixel formats it
|
||||
// supports for shared memory, this configures that for clients.
|
||||
self.wlr_renderer = c.zag_wlr_backend_get_renderer(self.wlr_backend) orelse
|
||||
self.wlr_renderer = c.river_wlr_backend_get_renderer(self.wlr_backend) orelse
|
||||
return error.CantGetWlrRenderer;
|
||||
// TODO: Handle failure after https://github.com/swaywm/wlroots/pull/2080
|
||||
c.wlr_renderer_init_wl_display(self.wlr_renderer, self.wl_display); // orelse
|
||||
|
@ -89,7 +89,7 @@ pub const Server = struct {
|
|||
|
||||
// Start the backend. This will enumerate outputs and inputs, become the DRM
|
||||
// master, etc
|
||||
if (!c.zag_wlr_backend_start(self.wlr_backend)) {
|
||||
if (!c.river_wlr_backend_start(self.wlr_backend)) {
|
||||
return error.CantStartBackend;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue