@ -16,9 +16,6 @@ You should have received a copy of the GNU General Public License along with thi
|
|||||||
#include <notcurses/nckeys.h>
|
#include <notcurses/nckeys.h>
|
||||||
#include <notcurses/notcurses.h>
|
#include <notcurses/notcurses.h>
|
||||||
|
|
||||||
#define true 1
|
|
||||||
#define false 0
|
|
||||||
|
|
||||||
enum {SECS_TO_SLEEP = 0, NSEC_TO_SLEEP = 250000000};
|
enum {SECS_TO_SLEEP = 0, NSEC_TO_SLEEP = 250000000};
|
||||||
|
|
||||||
struct notcurses *_nc;
|
struct notcurses *_nc;
|
||||||
@ -102,7 +99,7 @@ int rows;
|
|||||||
int cols;
|
int cols;
|
||||||
int midr;
|
int midr;
|
||||||
int midc;
|
int midc;
|
||||||
uint stop = false;
|
uint stop = 0;
|
||||||
|
|
||||||
void *notcurses_thread(void *_) {
|
void *notcurses_thread(void *_) {
|
||||||
uint32_t input = 0;
|
uint32_t input = 0;
|
||||||
@ -110,7 +107,7 @@ void *notcurses_thread(void *_) {
|
|||||||
|
|
||||||
while ((input = notcurses_get(_nc, 0, &ni)) != (uint32_t)-1) {
|
while ((input = notcurses_get(_nc, 0, &ni)) != (uint32_t)-1) {
|
||||||
if (ni.evtype == NCTYPE_RELEASE) continue;
|
if (ni.evtype == NCTYPE_RELEASE) continue;
|
||||||
if (input == 'q') { stop = true; break; }
|
if (input == 'q') { stop = 1; break; }
|
||||||
|
|
||||||
if (ni.id == NCKEY_RESIZE) {
|
if (ni.id == NCKEY_RESIZE) {
|
||||||
unsigned dimx, dimy, oldx, oldy;
|
unsigned dimx, dimy, oldx, oldy;
|
||||||
|
Reference in New Issue
Block a user