tetris: replace cuserid with getpwuid #577

pull/592/head
nick black 4 years ago
parent d339b118f1
commit dd044c96c8
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -49,7 +49,7 @@ void DrawBoard() { // draw all fixed components of the game
}
scoreplane_->set_bg_alpha(CELL_ALPHA_TRANSPARENT);
scoreplane_->set_fg(0xd040d0);
scoreplane_->printf(0, 1, "%s", cuserid(nullptr));
scoreplane_->printf(0, 1, "%s", getpwuid(geteuid())->pw_name);
scoreplane_->set_fg(0x00d0a0);
UpdateScore();
if(!nc_.render()){

@ -1,11 +1,13 @@
#include <mutex>
#include <array>
#include <pwd.h>
#include <atomic>
#include <thread>
#include <chrono>
#include <vector>
#include <cstdlib>
#include <clocale>
#include <unistd.h>
#include <ncpp/NotCurses.hh>
#include "version.h"

Loading…
Cancel
Save