Added configuration options XtermProgram and XtermResolution.
Fixed a warning.
This commit is contained in:
parent
2f38cffa51
commit
11076b1b89
|
@ -17,10 +17,14 @@
|
||||||
|
|
||||||
#include "windows.h"
|
#include "windows.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
|
#include "options.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
|
||||||
#define ESC '\x1b'
|
#define ESC '\x1b'
|
||||||
|
|
||||||
|
char console_xterm_prog[80];
|
||||||
|
char console_xterm_resolution[10];
|
||||||
|
|
||||||
static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid);
|
static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid);
|
||||||
FILE *wine_openpty(int *master, int *slave, char *name,
|
FILE *wine_openpty(int *master, int *slave, char *name,
|
||||||
struct termios *term, struct winsize *winsize);
|
struct termios *term, struct winsize *winsize);
|
||||||
|
@ -52,6 +56,13 @@ void XTERM_Start()
|
||||||
|
|
||||||
chain.resizeScreen = driver.resizeScreen;
|
chain.resizeScreen = driver.resizeScreen;
|
||||||
driver.resizeScreen = XTERM_ResizeScreen;
|
driver.resizeScreen = XTERM_ResizeScreen;
|
||||||
|
|
||||||
|
/* Read in driver configuration */
|
||||||
|
PROFILE_GetWineIniString("console", "XtermProg",
|
||||||
|
"xterm", console_xterm_prog, 79);
|
||||||
|
PROFILE_GetWineIniString("console", "XtermResolution",
|
||||||
|
"80x24", console_xterm_resolution, 9);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void XTERM_Init()
|
void XTERM_Init()
|
||||||
|
@ -123,9 +134,10 @@ static BOOL32 wine_create_console(FILE **master, FILE **slave, int *pid)
|
||||||
if ((*pid=fork()) == 0) {
|
if ((*pid=fork()) == 0) {
|
||||||
tcsetattr(fileno(*slave), TCSADRAIN, &term);
|
tcsetattr(fileno(*slave), TCSADRAIN, &term);
|
||||||
sprintf(buf, "-Sxx%d", fileno(*master));
|
sprintf(buf, "-Sxx%d", fileno(*master));
|
||||||
execlp(CONSOLE_XTERM_PROG, CONSOLE_XTERM_PROG, buf, "-fg",
|
execlp(console_xterm_prog, console_xterm_prog, buf, "-fg",
|
||||||
"white", "-bg", "black", NULL);
|
"white", "-bg", "black", "-g",
|
||||||
ERR(console, "error creating xterm\n");
|
console_xterm_resolution, NULL);
|
||||||
|
ERR(console, "error creating xterm (file not found?)\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue