Skip to content

Commit

Permalink
Merge pull request #52 from visionmercer/console-width-and-height
Browse files Browse the repository at this point in the history
Console Width and Height
  • Loading branch information
DualBrain committed Oct 13, 2023
2 parents 12458c6 + 04546ae commit 60d2234
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/c/libqb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19077,7 +19077,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
if (new_error) return 0;

#ifdef QB64_WINDOWS
if ((read_page->console && !passed)||i==console_image){
if ((write_page->console && !passed)||i==console_image){
SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo;
Expand All @@ -19086,7 +19086,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
}
#endif
#ifdef QB64_UNIX
if ((read_page->console && !passed)||i==console_image){
if ((write_page->console && !passed)||i==console_image){
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
return w.ws_col;
Expand All @@ -19113,7 +19113,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
if (new_error) return 0;

#ifdef QB64_WINDOWS
if ((read_page->console && !passed)||i==console_image){
if ((write_page->console && !passed)||i==console_image){
SECURITY_ATTRIBUTES SecAttribs = {sizeof(SECURITY_ATTRIBUTES), 0, 1};
HANDLE cl_conout = CreateFileA("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, & SecAttribs, OPEN_EXISTING, 0, 0);
CONSOLE_SCREEN_BUFFER_INFO cl_bufinfo;
Expand All @@ -19123,7 +19123,7 @@ void sub_put2(int32 i,int64 offset,void *element,int32 passed){
}
#endif
#ifdef QB64_UNIX
if ((read_page->console && !passed)||i==console_image){
if ((write_page->console && !passed)||i==console_image){
struct winsize w;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
return w.ws_row;
Expand Down

0 comments on commit 60d2234

Please sign in to comment.