Skip to content

Commit 95e62a8

Browse files
committed
I'm so retarded
1 parent c5609bc commit 95e62a8

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ UNAME_S := $(shell uname -s)
2222
ifeq ($(UNAME_S),Linux)
2323
LDLIBS += -lGL -lX11
2424
ifeq ($(ENABLE_PORTALS),1)
25-
CXXFLAGS += -DPORTALS=1 `pkg-config --static --cflags gio-2.0`
25+
CXXFLAGS += -DENABLE_PORTALS=1 `pkg-config --static --cflags gio-2.0`
2626
LDLIBS += `pkg-config --static --libs gio-2.0`
2727
endif
2828

src/screen_capture.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <X11/Xutil.h>
1515
#include <unistd.h>
1616

17-
#if PORTALS
17+
#if ENABLE_PORTALS
1818
#include <gio/gio.h>
1919
#endif
2020

@@ -202,8 +202,9 @@ static void on_response(GDBusConnection* conn,
202202

203203
capture_result_t capture_full_screen_portal(capture_result_t&)
204204
{
205-
GError* error = NULL;
205+
warn("Fallback to portal capture");
206206

207+
GError* error = NULL;
207208
GDBusConnection* bus = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &error);
208209
if (!bus)
209210
{

src/screenshot_tool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ bool ScreenshotTool::Start()
166166
m_screenshot = load_image_rgba(stdin_data_exist, config->_source_file);
167167
}
168168

169-
if (!m_screenshot.success || m_screenshot.data.empty() || !m_screenshot.error_msg.empty())
169+
if (!m_screenshot.success || m_screenshot.data.empty())
170170
{
171171
m_state = ToolState::Idle;
172172
error("Failed to do data screenshot: {}", m_screenshot.error_msg);
@@ -186,10 +186,10 @@ bool ScreenshotTool::StartWindow()
186186
m_state = ToolState::Selecting;
187187
CreateTexture();
188188
fit_to_screen(m_screenshot);
189-
if (!m_screenshot.success || m_screenshot.data.empty() || !m_texture_id)
189+
if (!m_texture_id)
190190
{
191191
m_state = ToolState::Idle;
192-
error("Failed to do data screenshot: {}", m_screenshot.error_msg);
192+
error("Failed create openGL texture");
193193
return false;
194194
}
195195
return true;

0 commit comments

Comments
 (0)